I have projects in my GitLab instance that are visible but give a 502 error when clicked on it.
I ran gitlab-rake gitlab:git:fsck on my GitLab instance and found that I'm flooded with these messages:
<repo_name> on default: 5:GetRepoPath: not a git repository: "/var/opt/gitlab/git-data/repositories/#hashed/f6/90/f6903a126cfb9fc6c0d18a26461f3cc74b256dc2be0a14c40ad11f7d789e65f8.git". debug_error_string:{"created":"#1665093580.291166622","description":"Error received from peer unix:/var/opt/gitlab/gitaly/gitaly.socket","file":"src/core/lib/surface/call.cc","file_line":1063,"grpc_message":"GetRepoPath: not a git repository: "/var/opt/gitlab/git-data/repositories/#hashed/f6/90/f6903a126cfb9fc6c0d18a26461f3cc74b256dc2be0a14c40ad11f7d789e65f8.git"","grpc_status":5}
I checked that the hashed repository storage path exists. Why would Gitaly now say that it is not a git repository?
Thank you.
Related
I am using deployer (from deployer.org) to deploy Laravel and Magento 2 sites. From what I understand, it should deploy the .git folder also to a server. But for my configuration it does not do it somehow.
How can I make sure the git repository is also deployed and is available on the server after a deploy?
To make clear what the issue is, steps to reproduce (for me).
Deploy to server with deployer (dep deploy)
Login to server with SSH
Go to project directory
Typ in git status
Expected result:
app#e1a372088c46 ~/application (master)$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean`
Actual result
app#app:~/public_html/application$ git status
fatal: not a git repository (or any parent up to mount point /)
I'm trying to do the following with Bitbucket Pipelines when i push to my test brand:
- git fetch
- git checkout master
- git pull origin test
- git push origin master
But i get the following message on git fetch: Permission denied (publickey). I was following this tutorial https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-pipelines-847452940.html so i already added an ssh key, but cannot understand what are the next steps that i need for the execution to have permissions to connect to the repository.
If “from same repository” really means that you want to access the repository in which the pipeline runs, the answer is: you don’t need that. When the pipeline runs, it starts the Docker image you defined in your YAML configuration and automatically checks out the commit you pushed. This means that at the moment when when your command (git fetch) is executed, the sources are already waiting for you in path /project.
BitBucket Pipelines automatically checks out the repository upon running. However, if you want to make changes to the repository (e.g. git tag or git push) you will need to add the SSH keys according to the post you have already found (https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-pipelines-847452940.html). That works for our environment.
Can you post the full bitbucket-pipelines.yml file?
I have installed SCM-Manager. I would like to use it in the future for version control. The problem is, I cannot add it as a repository in Xcode, and I cannot clone it from command line:
$ git clone http://127.0.0.1:8080/scm/git/MyRepo
Cloning into 'MyRepo'...
Checking connectivity... done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
$
In Xcode I get this message:
fatal: unable to access 'http://127.0.0.1:8080/scm/git/MyRepo/': The requested URL returned error: 403
SCM server logs this
failed to read basic auth credentials
I have tried to install on different server, checkout with different user, nothing helped.
The first message means that you have cloned an empty repository. The message is only a warning and the repository is fully functional. A better way is to create the "bare" repository in SCM-Manager and add the remote reference to a local created repository:
git init MyRepo
git-remote add origin http://127.0.0.1:8080/scm/git/MyRepo/
The messages from Xcode sounds like missing credentials.
I am a bit new to git, and as a result I have gotten myself into a git mess. I have an Xcode 4.5 project. In the command line I have been managing its local git repo as well as a remote repo on github that the local one is linked to. All was well until I decided to delete the remote repo on the GitHub website (called PictureFly) and create a new remote repo on the GitHub website (called PhotoFly). I would like my local repo to be unlinked to the old remote repo (PictureFly) and linked to the new remote repo (PhotoFly). Seems simple, but no matter what command I enter, I get one fatal warning or another. Here is a typical example of what I have been doing:
My attempts to remove the old remote origin:
//first attempt
git push origin :https://github.com/jac300/PictureFly.git
//first error
fatal: remote part of refspec is not a valid name in
:https://github.com/jac300/PictureFly.git
//second attempt
git push origin :PictureFly.git
//second set of errors
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
//third attempt
git push origin --delete PictureFly
//third set of errors
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
//fourth attempt
git push origin --delete https://github.com/jac300/PictureFly.git
//fourth set of errors
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Then I thought maybe I can just add the new remote repo:
git remote add origin https://github.com/jac300/PhotoFly.git
fatal: remote origin already exists. //how does it already exist?
So since it "already exists" I tried to push to that repo:
git push -u origin master
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
I have no idea what is happening or how to fix it. Any help is appreciated.
You can easily remove the repo on GitHub and create a new empty one from the website. So now you're stuck with your remotes pointing to the wrong url. To fix:
git remote set-url origin https://new.url.here
I'm just starting to look at Jenkins CI on my Windows 7 machine.
I thought for a first test I would create a git repo on my localhost which is aliased to
http://tests.local/jenkins/local
I setup a job in Jenkins, selected Git under source code management and added http://tests.local/jenkins/local.git as the Repository URL
When the job runs it fails with the error
ERROR: Error cloning remote repo 'origin' : Could not clone http://tests.local/jenkins/local.git
Is this a git issue or a Jenkins issue and how can I fix it?
Thanks
Have you run git update-server-info in your repo? This is needed if you want to clone/fetch via http. Run git help update-server-info or see online documentation here for more details.