Error pushing to GitHub - insufficient permission for adding an object to repository database

后端 未结 21 2145
孤街浪徒
孤街浪徒 2020-11-27 09:34

I\'m getting back an unusual error while trying to do a \"git push\" to my GitHub repository:

Counting objects: 8, done.
Delta compression using 2 threads.
Compre         


        
21条回答
  •  孤城傲影
    2020-11-27 09:53

    Nothing of the above worked for me. A couple of hours later I found the reason for the problem: I used a repo url of the type

    ssh://git@example.com/~git/repo.git
    

    Unfortunately I stored a putty session with the name example.com which was configured to login as user myOtherUser.

    So, while I thought git connects to the host example.com with the User 'git', Git/TortoiseGit has connected to the putty session example.com which uses the User myOtherUser. This leads to the exact same ..insufficient permission.. error (cause both users are in different groups).

    Solution: Rename the putty session example.com to myOtherUse@example.com

提交回复
热议问题