Bitbucket permission denied
Problem
This is a normal permission denied issue for Git remote repository access.
Here is the error message:
"C:\Program Files (x86)\Git\bin\git.exe" pull --rebase --progress "CPMS-DPW-CIPGIS" +refs/heads/master:refs/remotes/CPMS-DPW-CIPGIS/master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Done
Solution
In our case, it is simple. Since our only interaction w/ the remote repository is PULL, just change the SSH connection URL:
git@bitbucket.org:cpmsdev/cpms.git
to a HTTP URL:
https://bitbucket.org/cpmsdev/cpms.git
If you do need both PULL and PUSH, setting SSH w/ a private key (on the local computer) and a public key (on Bitbucket) is more helpful. See Set up SSH for Git .
Basically, there are 2 steps to configure SSH on my Windows computer w/ Git Extension:
- Generating a private key and a public key using Putty:
- Uploading the public key on my Bitbucket account. See "Set up SSH for Windows"/"Step 5. Install the public key on your Bitbucket account" on Set up SSH for Git .
Related articles
https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html