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

Then, I edited gitolite.conf, from…

repo oldrepo
    RW+     =   id_rsa

… to…

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?

  • SVN to Git to Gitolite and Lots of Files
  • How to keep/maintain public and private code in the same repository? (at repository hostings)
  • Hook Installed False
  • projects and gitolite remote on same machine
  • git: on the server, divert pushes to one branch to another
  • Seting up GIT server with anonymous user
  • Encrypted Git server with Gitolite
  • git clone git@myserver:gitolite-admin fails
  • 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 with ls -l.

    If 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

    Afterwards, 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 ~/.ssh/config file.

    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):

    1. 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.
    2. Change the name in the conf/gitolite.conf file 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.

    Git Baby is a git and github fan, let's start git clone.