Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

SSH KEY INVALID

Hi, all. I am new to bitbucket, and I am trying to connect UiPath (An automation tool) to bitbucket. I generated a ssh key on my pc using ssh-keygen and it got saved. When I open the key in notepad and paste in Add SSH key under Personal settings, it says the SSH key is invalid. Please advise if I am doing something wrong?

 

Best Regards

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 26, 2023

Hello @Cornelius and welcome to the Community!

It might have been the case that the command you used to generate the key used an encryption algorithm that is not supported by Bitbucket Cloud.

I would suggest trying to recreate the key following the instructions outlined in the following documentation, according to your platform : 

It's important to note that the key you need to add to Bitbucket is the public key (the extension of the file will be.pub)

Hope that helps! Let us know in case you have any questions or run into any issues following the instructions in the above articles.

Thank you, @Cornelius !

Patrik S

Hi Patrik, thank you for your response. I've installed GIT and when running through GIT Bash, I am not able to start the SSH service. Do you have any advice re that?

bitbucket.PNG

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 13, 2023

Hi Cornelius,

Based on the output, it looks like there may be other ssh-agent processes running on this computer.

You can run the following command to double-check if there is another ssh-agent process running:

ps -a | grep ssh-agent

If there is, you don't need to start the ssh-agent again.

Kind regards,
Theodora

SSH.PNG


Hi Theodora, thank you for your prompt reply. I ran this and it took me to the next line, so I am not sure if the agent is running ?Then after I tried to start the agent as described on Set up SSH key for Windows. I get the following error. Would you please be able to advise?

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 16, 2023

Hello @Cornelius ,

It seems like there's some issue with the installation of SSH. I would suggest uninstalling git for windows from your machine, and trying downloading and installing it again from https://git-scm.com/download/win .

Once the new installation is completed, you can try starting the SSH agent again. If the issue persists, could you try the same in a different machine and let us know if you get the same error?

Hi Patrik, I tried reinstalling, and it had the same issue. However, on a different machine I was able to, do you know of why it is not generating one on the desired machine?

I'll appreciate any advice.

 

Best Regards

 

Corenelius

SNIP.PNG

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 21, 2023

Hello @Cornelius ,

As this is particular to one machine only, it seems to be an issue with either the OS or the installation of SSH.

I would suggest trying the following command to compare the SSH version in each of the machines and check if the version are different :

ssh -V

Also, the ssh-agent is a tool used to facilitate the authentication when your ssh key contains a password, so you don't have to type the password every time. However, the ssh-agent is not required to connect to Bitbucket.

In this case, as an alternative to the ssh-agent, you could try creating  a file called config in the directory ~/.ssh/ with the following content :


 Host bitbucket.org
     HostName bitbucket.org
     User git
     IdentityFile ~/.ssh/<name of your private key>
     IdentitiesOnly yes

where in IdentityFile line you should provide the path to the private key, of which the corresponding public key you have already added to your Bitbucket account.

This config file will instruct SSH to use that key for any SSH connection to bitbucket.org domain. You can then use the command below to test cloning a repository you have access to : 

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:<workspace>/<repository>.git

Thank you, @Cornelius !
Patrik S

Hi Patrik, the versions were same. I managed to generate an SSH key through installing source tree and added it under Personal Key in Bitbucket. After I tried to push it to the repo by cloning the ssh url after git clone but I am getting an error saying failing to connect to bitbucket.org :(bit.PNG

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 23, 2023

Hello @Cornelius ,

From the screenshot you have shared, it seems you are using a different tool to interact with Bitbucket, which seems to be UIPath. Unfortunately, I have limited knowledge of the UIPath configuration.

Did you have a chance to test creating the config file, and using the clone command with verbose logs I shared in my previous comment? That command needs to be executed inside the git bash terminal.

Thank you, @Cornelius !

Patrik S

Like Sabine Mayer likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events