Reputation: 582
I can't push and I already tried all solution in this question. I'm using Windows10 and TortoiseGit.
I generated my SSH key with PuTTYgen and I already tried to replace the key in case my older was corrupted. When I try with git bash I got this error:
$ git fetch -p Permission denied (public key).
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
In TortoiseGit I get:
git did not exit cleanly (exit code 1)
Upvotes: 0
Views: 9155
Reputation: 25
For My case i did 3 steps to achieve the sucessful build.
revert all the local changes if any (or just keep a copy of it in case you need it for future use)
Do a git clean up, do a pull and check the logs for error
GO to the git bash option and the error i was getting in log in above stem (i my case ) as "error: cannot lock ref and the branch details", so in the git bash i ran the following command git update-ref -d 'Branch_name'
For example if the error was something like **
**error: cannot lock ref 'refs/remotes/origin/EXMPLEISSUE/EXAMPLE-1011_DEMO_web_interface_DOES_NOT_GET_GIT_UPDATE':
Then i ran following command git update-ref -d 'refs/remotes/origin/EXMPLEISSUE/EXAMPLE-1011_DEMO_web_interface_DOES_NOT_GET_GIT_UPDATE'
We have to ensure all the error in logs to be solved similarly before getting a successful pull by doing git update-ref -d 'Branch_name' and finally i can get the take the successful pull from git.
Upvotes: 0