The question title says it all. I added my keys under my bitbucket account and as expected I can do ssh -T firstname.lastname@example.org to get logged in into the server and received the logged in as Satco message. But then when I try to clone a repo where I am admin, for example git clone email@example.com:Satco/perception.git I get:
13:05:46.735698 exec-cmd.c:237 trace: resolved executable dir: C:/Users/username/AppData/Local/Programs/Git/mingw64/bin
13:05:46.735698 git.c:440 trace: built-in: git clone firstname.lastname@example.org:Satco/perception.git
Cloning into 'perception'...
13:05:46.782564 run-command.c:663 trace: run_command: unset GIT_DIR; ssh email@example.com 'git-upload-pack '\''Satco/perception.git'\'''
firstname.lastname@example.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Hi @Kaju Bubanja ,
Perhaps the SSH key used to connect to the repository may not be same. Therefore, could you please run the following command reviewing the SSH key used by your clone command:
ssh -v -T email@example.com
This should provide with:
debug1: Offering public key: ....
debug1: Server accepts key: ...
Enter passphrase for key '....':
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([126.96.36.199]:22).
Having this information, could you please attempt on issuing the "git clone" command providing the SSH key mentioned in Offering public key?
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example -F /dev/null" firstname.lastname@example.org:Satco/perception.git
The command above will:
If you continue on experiencing issues, please enable DEBUG on your Git command to review if the SSH key you are providing is the same one as the one you have on https://bitbucket.org
# on Linux (Terminal / Git Bash)
# on Windows (Command Prompt)
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events