Getting service=git-receive-pack not found: did you run git update-server-info on the server?

11,597

I was getting the same error when git commit and push. I browsed github for my file and tried to edit there, then I got to know I didn't had write access to the branch. I tried committing with another ID, voila it works. the error is misleading I believe.

Share:
11,597
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I tried to push my local changes to my branch on GitHub server. This was working like a charm before, when I used "Git Bash".
    I configured GitHub Windows app provided by Git (that purple cat icon which shows up on your Desktop when you install Git) to push my changes this time.
    Thought GUI tool would be easier! When I tried "Publish" I saw a fatal-error msg.
    Then I switched back to 'Git Bash' which worked fine with my previous commit to the same remote branch.

    I typed following commands:

    git add .gitignore
    git add <<files>> # WORKED
    git commit -m <commit desc> # WORKED
    git push origin <mybranch> # errored out
    

    I got the following error:

    fatal: https://github.com/reponame/tree/<mybranch>//info/refs?service=git-receive-pack not found: 
    did you run git update-server-info on the server?
    

    I tried different things before posting this from similar posts.

    • I edited PATH with ..Git\bin,\Git\cmd ..Git\libexec\git-core. This didn't help!
    • Made sure .git/config has my branch URL
    • Tried 'commit and push' from Eclipse. Same error.

    Did installing/configuring Windows GitHub client app messed up something on my PC where I can't push my changes to remote repo anymore?

    What else I should do to push my changes to repo branch? This is on Windows.