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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,689
Community Members
 
Community Events
176
Community Groups

Why do I suddenly need SSH?

After a couple of uninterrupted and working Pulls (the most recent interruption that costed us a few hours was the introduction  of app passwords, which I had to create twice again so far when it stopped working, thank you very much for this 'safety feature') , the latest surprise was the message:

The authenticity of host 'bitbucket.org can't be established. (etc)

After again a long time of trial and error entering obscure commands in obscure 1980 style command prompts, I got a working SSH key which was apparently the solution and vould again pull the changes of the solution of my colleague. Let's see how many times/days it works this time before the next error or issue....

Does anyone know why I got this? I changed nothing and my colleague didn't either.  What changed and why?

It would be really great if we could synchronize code without having to spend time every time solving unsolicited changes like this.

1 answer

0 votes

Hi @ic2,

The protocol used is determined by the remote repo URL in your clone.

If you run git remote -v in your clone and the output looks like the below, then SSH will be used.

origin git@bitbucket.org:workspace/repo.git (fetch)
origin git@bitbucket.org:workspace/repo.git (push)

If the output of git remote -v shows a URL like the below, then HTTPS will be used:

origin https://BitbucketUsername@bitbucket.org/workspace/repo.git (fetch)
origin https://BitbucketUsername@bitbucket.org/workspace/repo.git (push)

This info is saved in the .git/config file of a user's clone.

The only possible reasons I can think of for this issue are
a) someone switched the remote URL of that clone from an HTTPS one to SSH
b) the directory of a previous clone was deleted, and someone made a new clone of the repo using an SSH URL

If you want to change the remote URL in a clone, you can use the following command:

git remote set-url origin <repo_url>

where
origin replace with the name of your remote, if different
<repo_url> you can use either the HTTPS URL of the repo or the SSH one, depending on what you prefer to use.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events