Hi Support,
I want to use Bitbucket service using SSH access key. When I created both project/repository, I had add SSH key into my account. I will follow the instruction to clone my repository into remote server.
git clone ssh://git@bitprd.hefechip.com:7999/hktst/test_rep01.git
The account git who is not create in Bitbucket user or server user. What is a correctly settings?
Thanks.
JohnTsai
johntsai@hefechip.com
Hey @johntsai !
The short answer: this is normal, you don't need to do anything. Use the suggested URL to clone and it will work.
The long answer: git, and Bitbucket, don't really care about the SSH user. SSH is just a transport mechanism. Your SSH key is what determine which user you are, the SSH "git@…" username is ignored entirely. You can test this yourself, by replacing the username with something else:
git clone ssh://thisuserdoesnotexist@bitprd.hefechip.com:7999/hktst/test_rep01.git
If you did this, you'd find it worked just the same!
tl;dr the "git" username is there just to meet the requirements of the SSH protocol, and the username "git" is chosen in particular simply by convention. Bitbucket Cloud, GitHub, etc. all use the same username, for the same reason.
I hope that helps!
Cheers,
Dave
Hi Dave,
Thanks for your reply~
Yes, I had tried another account to replace git@. It's still not working to clone my repo to local.
I have to follow the instruction at https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/#SetupanSSHkey-ssh2
I used linux client (Set up SSH on macOS/Linux) and I can't pass the verification using
ssh -T git@ourbitbucket.com
prompt: git@ourbitbucket.com's password:
Do you know why the SSH Access key is not working? Where I can check the log for this issue?
B.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@johntsai the test you ran will connect to your host system's default SSH port, not Bitbucket's SSH port. Can you re-test like so:
ssh -T -p 7999 git@ourbitbucket.com
Having said that: What happens when you do try to clone? What message do you get?
Cheers,
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.