1. Summarize the problem
I followed Bitbucket's instructions on setting up ssh.
I have a pub/priv key pair, and the pub key pasted into Bitbucket settings (Access Keys) for the project.
I have a build server on a GCE VM. git clone
worked successfully, and git pull origin master
works. I am using a passphrase.
However if I make a small change on a single file, git commit
on the GCE VM, and do git push origin master
, it fails with the following error message.
Enter passphrase for key '/home/proc/.ssh/id_rsa':
Unauthorized
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
git remote -v
shows
origin [email protected]:<my-account>/<my-repo>.git (fetch)
origin [email protected]:<my-account>/<my-repo>.git (push)
If git pull origin master
works OK, then ssh is setup properly.
I added the following file: $HOME/.ssh/.config
, with the contents below, but it did not help.
Host bitbucket.org
IdentityFile ~/.ssh/id_rsa
my keyfile was generated with the following:
ssh-keygen -t rsa -b 4096 -C "<comment>"
2. Provide background including what you've already tried
I've read every stack overflow article on Bitbucket authentication issues.
3. Show some code
git add <changed file>
git commit -m "made some updates"
git push origin master
4. Describe expected actual results including any error messages
I am trying to git push origin master
to bitbucket.org.
/home/proc/.ssh/id_rsa
) requires an extra password - see https://mcmap.net/q/13497/-ssh-key-still-asking-for-password-and-passphrase – Dasyurefatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
It does not say incorrect passphrase, but accepts my passphrase. It's not a passphrase issue, my passphrase is 5 lowercase characters that I am entering correctly each and every time, I am able to pull with this 5 lower character passphrase, but not pull. If you have any ideas for a solution, please post. You could go try this first yourself, see the problem before responding. – Venn