We have a requirement to map unix servers directly with BitBucket so as to upload files from servers to the BitBucket repo. Appreciate if someone can suggest what additional steps are required apart from the config steps we have listed below -
1 - On one of Linux server I have run ssh-keygen -t rsa under my home directory. this created the private and public ssh keys under $HOME\.ssh2
2 - went to the BitBucket Repo (e.g. Stars 7956) and created a fresh repository. I have admin privilege here.
3 - added ssh public key from server to the access key option present under repo (have also tried adding key from maage account)
4 - picked ssh string from the new BitBucket repo clone tab
5 - At unix server I have run "Git init" and then run "Git Clone ssh:\\url..."
6 - The Git clone is filing with error message as highlighted below -
======================
bash-4.1$ git clone
ssh://git@server.domain.net:7999/stars/prpc_5.git
Cloning into 'prpc_5'...
fatal: Could not read from
remote repository.
Please make sure you have the
correct access rights
and the repository exists.
===================================================
Thanks and regards
krishna
Hi Krisha,
Hopefully you're not experiencing this anymore, however, if you are there is a knowledge base article titled Git clone fails due when cloning via SSH that may help:
Check the existing keys on the client by running
ssh-add -l
Attempt to clone a change to the repository with the Git client debug on:
# Example on Linux
GIT_SSH_COMMAND="ssh -vvv" git clone ssh://git@<bitbucket URL>:<bitbucket port>/<project key>/<repository slug>.git
The log will show which key has been used for the authentication and which ones have been tried. The line to check will look like the following:
debug1: Offering RSA public key: /Users/<username>/.ssh/id_rsa
It sounds like you have verified the keys were added to the repository already so try the rest of the steps and let us know.
Cheers,
Branden
Hi Branden,
thank you for your reply. Yes, I was able to map the ssh keys properly. the catch was with private key which should be defined with a separate ssh.bash script and exported with GIT_SSH.
regards
krishna
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.