The question title says it all. I added my keys under my bitbucket account and as expected I can do ssh -T git@bitbucket.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 git@bitbucket.org: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 git@bitbucket.org:Satco/perception.git
Cloning into 'perception'...
13:05:46.782564 run-command.c:663 trace: run_command: unset GIT_DIR; ssh git@bitbucket.org 'git-upload-pack '\''Satco/perception.git'\'''
git@bitbucket.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 git@bitbucket.org
This should provide with:
debug1: Offering public key: ....
debug1: Server accepts key: ...
Enter passphrase for key '....':
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.205.93.0]: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" git@bitbucket.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)
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
# on Windows (Command Prompt)
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
Kind regards,
Rafael
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.