Hi Community,
According to the instruction, I generated SSH keys on my work laptop. Added them in my Bitbucket. Then I copied everything inside the .ssh folder to .ssh folder on my personal laptop.
When I try to connect to the bitbucket on my personal laptop to fetch all changes after it prompts me to enter the (ssh) passphrase, after entering the phrase, it fails with the message:
remote: Invalid username or password
fatal: Authentication failed for '~my repo address~'
On the contrary, when I use 'git clone' command to clone the same repo and enter the same passphase it copies everything smoothly.
I'm a novice to these things. Please help me to set up connections on both laptops.
Thank you!
Hello @GandolfJ,
When I try to connect to the bitbucket on my personal laptop to fetch all changes
Hm, do you mean you're running git fetch command? I believe you're running this command in a local copy of a repository which is configured (e.g. was cloned) to use HTTP transport, not SSH. I believe this is the case because this error you're getting means you're not using SSH:
remote: Invalid username or password
You can verify my assumption by running the following command in your local copy:
git remote -v
If the URLs in the output have https scheme, then Git is not using SSH in this local repo copy. So you can two options:
git remote set-url origin git@bitbucket.org:<workspace>/<repo_slug>
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
I managed to solve the problem and think I've had a few problems. What did I do?
1. I cloned the repo as you suggested
2. I followed your instruction here https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html#SetupanSSHkey-Step1.Setupyourdefaultidentity
(Originally I made mistake and added SSH keys for the specific repo not to an account in general)
3. I followed this instruction to troubleshoot issues when I was able to fetch from remote origin but was not able to push my changes
https://stackoverflow.com/questions/16074832/cannot-push-to-git-repository-on-bitbucket
thank you, Daniil!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.