Git Extensions: Unable to push to repo after renaming it (gitolite)
I logged into my server as an administrator (not as the Git user, which may have been a mistake), and did:
mv oldrepo.git newrepo.git
- Auto deployment PHP script using Gitolite
- How do I properly implement git submodules using Gitolite?
- Cannot push from Source Tree
- Gitolite push error
- Gitolite post-receive hook not executable anymore after each gitolite-admin push
- FATAL: W refs/heads/master DENIED by fallthru - Gitolite Folder permission setup
Then, I edited gitolite.conf, from…
repo oldrepo RW+ = id_rsa
repo newrepo RW+ = id_rsa
… and pushed that to the gitolite-admin repo.
Now, when I attempt to push to newrepo, I get the following error (using Git Extensions):
“C:\Program Files (x86)\Git\bin\git.exe” push –recurse-submodules=check –progress “origin” refs/heads/master:refs/heads/master
FATAL: W any newrepo id_rsa DENIED by fallthru
(or you mis-spelled the reponame)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I’m still able to push to all of my other repositories just fine, no problems.
What have I done?
2 Solutions collect form web for “Git Extensions: Unable to push to repo after renaming it (gitolite)”
Sounds like you moving the repo is probably the issue. I would hop back on the server and check the owner of
newrepo.git and/or the files it contains are owned by root (or your admin account), you can run this as root (or with sudo)
chown -R git newrepo.git
ls -l should show that it is owned by git, not root.
If that’s not the issue, I would double check your remotes on the local computer with
git remote -v and also make sure there’s nothing weird in your
Double-check the move/rename process with Gitolite:
Renaming a repo is also not automatic. Here’s what you do (and the order is important):
- Go to the server and rename the repo at the Unix command line.
Don’t forget to retain the “
.git” extension on the directory name.
- Change the name in the
conf/gitolite.conffile in your gitolite-admin repo clone, and add/commit/push.
The OP MiloDC confirms in the comments:
I’ve got it working now (by reinstalling Gitolite and going through the set-up procedures again), I suspect that logging in as an admin and effecting the rename caused problems.