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,455,369
Community Members
 
Community Events
175
Community Groups

What is the proper and simplest way (hopefully a How To Guide) to connect via SSH to the git?

Hello,

Hopefully someone can point me to the right documentation on this matter.

I'm getting this emails saying there will no longer be able to use password.

What is the proper and simplest way (hopefully a How To Guide) to connect via SSH from an own server to the git at bitbucket using other method other than password?

2 answers

1 vote
Caroline R Atlassian Team Feb 01, 2022

Hi, @capuromeyer, thank you for reaching out to Atlassian Community.

Just to complement Robert’s answer, in order to change your authentication method in Git, you can change the remote URL of your repository (you can switch it to SSH/HTTPS). In order to modify that, you can run the following commands:

1. From a terminal, navigate to the repository:

$ cd ~/<path_to_repo>

2. Run git remote -v to see the current remote URL:

$ git remote -v
origin https://emmap1@bitbucket.org/tutorials/tutorials.git.bitbucket.org.git (fetch)
origin https://emmap1@bitbucket.org/tutorials/tutorials.git.bitbucket.org.git (push)

3. Update the remote URL with git remote set-url using the current and new remote URLs.

$ git remote set-url origin git@bitbucket.org:{workspaceID}/{repository_name}.git

In case you would like to read more about how to change the remote URL of your repository, you can access the following page:

And if you need any help to configure an SSH key, you can find more information here:

I hope this helps, but do let me know if you have any questions. 

Kind regards,
Caroline 

0 votes

Are you talking about setting up an SSH key?  Here is the documentation for how to do that .

https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

Hi thanks for replying

Actually, I'm talking about command line push/pull to a repository at Bitbucket.

I will try to explain myself further.

Let's say we have a simple web project within an Bitbucket's private repository. All development changes are made at development/staging servers after being ready we push changes via Git to Bitbucket; then from a production server via Git we pull those changes to live production.

Working on Ubuntu environment, we use:

git push origin production (development --> Bitbucket)
git pull (Bitbucket --> production)

when using the above, the command line asks for a password [bitbucket user password] and all is done, I understand it will no longer be possible to do it by a password.

I don't know how to do the above by other methods; as passwords will be deprecated I'm forced to learn a new way, hence my question.

What is the easiest/simple way to do it?

If you're talking about personal account passwords going away, this deprecation notice specifies this affects connecting to the Bitbucket API and using git over HTTPS.  SSH doesn't appear to be affected.

Since it appears you're talking about using git over SSH, the original link I supplied does apply.  That's what I use to connect between my local repo and Bitbucket.

Hope this helps.

Hi, thanks for replying.

I'm a little confused by now.

When cloning a repository into a server I use:

git clone https://bitbucket.org/team/repository.git /path/to/directory

I believe I'm connecting through HTTPS

Will this be affected?

You're connecting over HTTPS.  Connecting over SSH would look like:

git clone git@bitbucket.org:team/repository.git /path/to/directory

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events