Team city and GitLab - gitlab

I am trying to connect our Team City and our GitLab. I configured all "Version settings" as it was described in the manual:
The root have default brunch as some private brunch that I created.
When I press the "Commit current project settings" I het this error:
Error while committing settings change 'TeamCity change in 'NetSuite-AI-Solutions / cxi-recommender' project: commit current project settings': Push failed, status: REJECTED_OTHER_REASON, message: hook declined
I checked that our GitLab has no hooks. I even tried to remove protection from master brunch, but this does not solve the problem.
What else can I do to fix this issue? How I get more informative Team City log?

Related

GitLab runner unable to clone private GitLab repositories

I'm using a shared runner that has access to the entire project group. In this one particular project on my GitLab server whose visibility is set to "private", when the runner attempts to clone the repository, it presents an error message noting that it could not clone the repository with a 403 response.
I searched high and low in the documentation but couldn't find the explanation for this nor a solution to this problem. I noticed when I switched the project's visibility to internal, everything started working.
Does anyone know why GitLab runners cannot access private repositories? If I wish to grant the runner access and the ability to execute the repo's CICD pipeline, how can I do so?
Here are the logs:
Fetching changes with git depth set to 50...
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /builds/4q6GE3ka/0/mysecretproject/myproject/.git/
Created fresh repository.
remote: You are not allowed to download code from this project.
fatal: unable to access 'https://example.com/mysecretproject/project.git/': The requested URL returned error: 403

I am unable to delete an empty repository in gitLab

This is the error I get.
This project was scheduled for deletion, but failed with the following
message: ContainerRegistry::Path::InvalidRegistryPathError
If this is a self-hosted instance, a GitLab administrator can delete this project from the rails console.
To start the rails console, from the command line on the gitlab instance:
gitlab-rails c
Then use the console to delete the project.
user = User.find_by_username('root')
project = Project.find_by_full_path('mygroup/myproject')
::Projects::DestroyService.new(project, user, {}).execute
Alternatively, you may be able to fix the error that prevents the deletion. Change the namespace for the project to a valid name like 'deleteme123' then try deleting it again.

Android Studio GitHub: push to origin/master was rejected

I have shared my project to GitHub. I have just started using GitHub and I am not knowledgeable about Git in general, just following online tutorials. Each time I push to GitHub I get an error: push to origin/master was rejected. I searched online and, as I understand it, the files in the remote repository must have changed. But I am the only one connected to my repository and it is set to Private.
I did not change the files in GitHub and no one could have changed it. But each time I make edits to my local files in Android Studio and push it, I always get the same error.
P.S.: I'm using the GUI, not the Terminal.
I tried deleting my repository, shared my local project again, update my code, then push, but I get the same error, again.
Same happened to me. Seems the problem could be there are some files in your GitHub repository.
Create a new blank repository on Git.
On Android Studio you need to VCS -> Import into version control -> Create Git Repository...
If above works, Commit and Push your files to GitHub.
If not, create a backup of your source code folder.
After that rename your folder.
Copy your files into the recently created new folder (except the .git sub-directory)
Try again with the VCS -> Import into version control -> Create Git Repository... to the new folder.
It worked for me before some attempts and I could Push my work to GitHub. Hope it helps.
Lets say your branch name is name_of_branch
In case if you see a Git -> Console -> log message saying.
refs/heads/name_of_branch:refs/heads/name_of_branch [remote rejected]
(cannot lock ref 'refs/heads/name_of_branch': 'refs/heads/name' exists;
cannot create 'refs/heads/name_of_branch'
This means there is some issue with branch name somehow. I solved it by renaming my branch.
VCS -> Git -> Branches -> select your branch and rename
I had such an issue too and I clicked the tab of Git on the lower left of Android Studio and then selected "console", I saw [remote rejected] (push declined due to email privacy restrictions).
I then referred to the following thread:
Error "Your push would publish a private email address"
-----------Addition------------
The error message could also look like this:
Successfully created project '(your project name)' on GitHub, but initial push failed: Enumerating objects: 10, done. Delta compression using up to 4 threads Total 10 (delta 0), reused 0 (delta 0), pack-reused 0 remote: error: GH007: Your push would publish a private email address.
or
remote: You can make your email public or disable this protection by visiting: remote: http://github.com/settings/emails failed to push some refs to 'xxx.git'

'~/play-services-location/10.2.6/play-services-location-10.2.6.pom'

Face the following error during sync with android studio.
Error:Could not GET 'http://192.168.2.247:8081/artifactory/list/libs-snapshot-local/com/google/android/gms/play-services-location/10.2.6/play-services-location-10.2.6.pom'. Received status code 409 from server: Conflict
Enable Gradle 'offline mode' and sync project
But I never use play location anywhere.
Didn't found any solution. Please help.
The 409 error you are getting from Artifactory is a result of trying to resolve a release artifact from a snapshots repository (libs-snapshot-local). Looking at the URL in the error log you provided, it seems that you are working with the local libs-snapshot-local repository.
You can solve the issue by using a virtual repository, such as libs-snapshot, which aggregates your local snapshot repositories and remote repositories such as JCenter and Maven Central (for serving the request for play-services-location).

(remote rejected) master -> master (pre-receive hook declined), Push rejected, failed to compile Node.js app

I know that there's couple posts like this one, but solution of any of them works for me.
Here is what I receive when I go for git push heroku master:
Please support. Ignoring node_modules is not working.
Docpad app - package.json file is updated according to docpad's manual.
I also have Procfile set up as in the link above.
PS. I have tried to deploy docpad app via openshift, but while Im going with manual from http://docpad.org/docs/deploy/ I receive error at step 5.
The application 'appname' is configured for git reference deployments but the
artifact provided ('https://github.com/myusername/appname#master') is a url.
Please provide a git reference to deploy (branch, tag or commit SHA1) or
configure your app to deploy from binaries with 'rhc configure-app appname
--deployment-type binary'.
If I configure myapp to deployment-type binary it isnt working neither.
The plugin which heroku tries to install returned 404 and the installation fails due to that.
Verify that the plugin is indeed public and not something you have wrote or used locally.
There is no package with this name hosted on the registry you use.
Remove the line with "docpad-plugin-blah": "2" from your package.json file. That line was provided in the docs simply to show you how to install plugins, but there's no such plugin as blah.
"dependencies": {
"docpad": "6"
},
I strongly recommend that you read through the Getting Started on OpenShift to get an overview of the development workflow using Git.
That being said, and if you really meant to use git reference deployments and you know why you are using them, then read through the Managing Deployments section on the developers page of OpenShift and find out how to properly set up git reference deployments. For instance, 'https://github.com/myusername/appname#master' is not a valid git url and therefore it cannot be cloned.

Resources