want to map unix (Linux and AIX) servers directly with BitBucket repository

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@cedt-icg-bitbucketcli.nam.nsroot.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

1 answer

0 vote

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:

  • Ensure an SSH key has been added to the user or the repository
  • 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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked 3 hours ago in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

34 views 3 3
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you