It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SSH Key Read/Write for My Team/Organization

I'm in a Team with bitbucket account, and I've created a repo, say 

git@bitbucket.org:<my_team>/fashion_repo.git

The project is on remote server and all member's team should be able to push and pull using a common ssh key.

I've tried to add an ssh key to fashion_repo via 

Settings > General > Access keys 

but as advised I can gain read-only (pull) and not write (push) permissions.

 

Since my only need is to make git push and git pull without using my personal account (many developer on same project) and would that all developer could use same non-personal ssh key, what can I do?

 

I know I could create a new account as "server account", but I hope there's a better solution.

 

Thanks,

Sim

2 answers

2 accepted

0 votes
Answer accepted
edwin Community Leader Jan 27, 2018

Hi Sim,

As long as your team has access to the repo, they can use personal SSH keys. For you to use common keys, you'll have to generate one and send the private key to each team member.

Hi Edwin,

and thanks for your reply.

One thing I don't understand: 

For you to use common keys, you'll have to generate one and send the private key to each team member

The one you suggest to generate should be generated in my personal account? that is I have to share a personal ad-hoc SSH KEY with other members? There's no chance to associate an unpersonal SSH KEY about that repo?

edwin Community Leader Jan 27, 2018

Sorry it wasn't very clear. I meant creating a new SSH key (unpersonal) that you can share with your team.

For my goal the shared SSH Key should be on my shared server but my problem is one:

where can I set that key into bitbucket repository's settings so that it could be possible perform both PULL and PUSH? (not read-only)

Here there's settings available with my account:

Settings Avaialbe Here

 

Settings > General > Access keys  is read-only, and I think that PIPELINES section is used to set pipelines, that is operation as test and build my project... I just want to be able to make PUSH command.

 

Be patient, please!

jredmond Atlassian Team Jan 29, 2018

Your only option here would be to set up an SSH key; associate it with a specific user account; and distribute the private key.

I really do not like that option, though, because the act of sharing the private key is inherently insecure, and because you'll need to change the key every time your team membership changes. Far better to have your team members set up their own individual keys and do pushes and pulls on their own.

I was afraid it was just like that...

The problem is that all team (5 persons) access the server with same account (not best practice, I know), so we can't use more than one key.

Currently my solution is to have modified the repository's URL in:

https://bitbucket.org/<my_team>/fashion_repo.git

so each user can push and pull inserting it's username and password every time... uncomfortable, but a good compromise.

 

Thank you 

After some research, I found that is the way to create the ssh key correctly. And add the ssh key to the team, no at the settings project.

Captura de pantalla de 2018-06-25 17-03-00.png

 

 

Generating a new SSH key

  1. Open Terminal.

  2. Paste the text below, substituting in your GitHub email address.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    This creates a new ssh key, using the provided email as a label.

    Generating public/private rsa key pair.
    
  3. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.

    Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]
    
  4. At the prompt, type a secure passphrase. For more information, see "Working with SSH key passphrases".
    Enter passphrase (empty for no passphrase): [Type a passphrase]
    Enter same passphrase again: [Type passphrase again]
Like # people like this
0 votes
Answer accepted

@Samuel Ivan thank you! The setting's image is precious!

So ... I accept that answer.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Share your software development horror stories!

Hey Community! I work on the Bitbucket product marketing team. With Halloween approaching, we wanted to discuss a topic tailor-made for October: development horror stories. Whether it was a lurk...

1,661 views 11 3
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you