Git SSH keys

SSH keys are used to identify trusted computers without involving passwords. In this article we'll show you how to upload an existing key or generate a new pair, so you can use them to authenticate in your repositories on Buddy.

Warning
The default path to the keys and configuration file is ~/.ssh. The default name of the key is id_rsa. You can choose another name if you wish, but it must be reflected accordingly in the configuration.

Adding SSH keys in Buddy

  1. To configure Git SSH keys in Buddy, go to your Security Account Settings and scroll down to the Git SSH keys for accessing repositories hosted with Buddy section.

Image loading...

  1. Click the + icon to reveal two options:
  • Add SSH key - if you already have an SSH public key on your machine
  • Generate SSH key - if you want Buddy to generate a new key pair for you

    Image loading...Adding SSH keys to your Buddy profile

Generating a new SSH key

Selecting Generate SSH key opens a window where you can (optionally) set a passphrase for the private key. Then, click Generate & download key.

Image loading...Key generation view

Buddy will create a new key pair, add the public part to your profile and offer the private part for download.

Hint
Keep your private key secure. Never share it with anyone. You'll need it to connect to Buddy via SSH.

Uploading an existing SSH key

If you already have an SSH key, choose Add SSH key.
Paste your public key into the field, optionally give it a name, and click Add new SSH key.

Image loading...Key upload form

Make sure the key starts with ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp384 or ecdsa-sha2-nistp521.

Hint
Buddy will automatically upload the public key to the service - you don’t have to add it manually.

Generating SSH keys manually

  1. Fire up your console/terminal and type:

    bash
    ssh-keygen -t rsa -b 4096 -C "your_email@address" $
  2. Press Enter when prompted to select the default file in which to save the key.
  3. (Optional) Type passphrase for higher security.
  4. Review the fingerprint (id) of your key and close the console.

Solving problems with SSH keys

Cannot clone or push/pull repository

If you’re not able to clone or push/pull from the repository, make sure you have configured everything according to the list below:

  1. The file ~/.ssh/config contains an entry with our service:

    Host app.buddy.works HostName app.buddy.works User buddy IdentityFile ~/.ssh/id_rsa
  2. Depending on your registration region, the SSH URL to your project looks like this:

    buddy@app.buddy.works:WORKSPACE/PROJECT buddy@eu.buddy.works:WORKSPACE/PROJECT
Danger
URLs in HTTPS format do not work.
  1. You have properly added the key to the ssh-agent:

    bash
    ssh-add ~/.ssh/id_rsa $
  2. The remote address has been properly configured.
  3. The local repository folder contains a hidden .git directory with the config file. Make sure the file contains the following entry:

    [remote "origin"] url = buddy@app.buddy.works:WORKSPACE/PROJECT fetch = +refs/heads/*:refs/remotes/origin/*

Permission denied error

If you’re receiving the following error, it means that the key added to Buddy doesn’t match the key on your computer:

Permission denied (publickey,keyboard-interactive). fatal: The remote end hung up unexpectedly

Here’s what you should do:

  1. Go to your ~/.ssh folder and double-check if the public key in the folder is the same as the one in Buddy.
  2. Run this command to see if Buddy can authenticate properly with the keys: ssh buddy@app.buddy.works If everything’s alright, you’ll receive a response of this type:

    Hi there! You are good to go. Just start pushing and pulling :) Connection to buddy.works closed.
Hint
If you again fail to authenticate, it means that the keys still don’t match.
Tip
If you are 100% sure that the keys are the same and everything should work properly, please run ssh -vvv buddy@app.buddy.works and send the output to support@buddy.works.

Last modified on Apr 18, 2025