Missed Team ’24? Catch up on announcements here.

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

Authentication fails for existing local repositories

messier79
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 27, 2022

Hi

Following the authentication method change from March 1st, I added a SSH Key to my account and added that key in Pageant.

I can clone a repo and push/pull, but for an already cloned repo, I cannot.

I have a few repos cloned locally and I cannot use them anymore.

I started cloning them again, but it takes time...

What needs to be done for the old repo to take the authentication changes?

I use TortoiseGit on Windows.

Thanks

2 answers

0 votes
messier79
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2022

Thanks, I ended up checking out the repos again.

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2022

Hi @messier79,

If the existing repos are using HTTPS, you will need to change the remote URL for each of these local repositories from HTTPS to SSH.

I'm not very familiar with TortoiseGit, but somewhere in the repo's settings there should be a configuration option for Remote.

If the URL displayed there is an HTTPS one:

https://BitbucketUsername@bitbucket.org/WORKSPACE-ID/REPO.git

you should change it to the following, in order to use SSH:

git@bitbucket.org:WORKSPACE-ID/REPO.git

This is something you can also do from a command-line application.

Navigate to the directory of each repo, and run

git remote -v

If you see in the output

origin https://BitbucketUsername@bitbucket.org/WORKSPACE-ID/REPO.git (fetch)
origin https://BitbucketUsername@bitbucket.org/WORKSPACE-ID/REPO.git (push)

You can run the following command to change the URL of the remote to an SSH one:

git remote set-url origin git@bitbucket.org:WORKSPACE-ID/REPO.git

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events