Git SSH keys

SSH keys are used to identify trusted computers without involving passwords. In Buddy, you can either use your existing keys with or generate a new pair.

Generating Git SSH keys in Buddy

  1. Click your avatar, top-right to bring up the profile sidebar.
  2. Click Manage your profile (alternatively, type /my-id after your domain).
  3. Go to SSH keys and click Add a new SSH key:

    SSH Keys tabSSH Keys tab

  4. Proceed with the security check.
  5. Follow the instructions to generate a new pair of SSH keys:

    Generating an SSH keyGenerating an SSH key

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

You can add the passphrase to your keychain so that you don’t have to type it every time you try to reach your repositories.

Generating SSH keys manually

  1. Fire up your console/terminal and type:

    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.

Adding existing SSH keys

  1. Click your avatar, top-right to bring up the profile sidebar.
  2. Click Manage your profile (alternatively, type /my-id after your domain).
  3. Go to SSH keys in the Settings tab and click Add a new SSH key.
  4. Paste the contents of your public key or click upload the key from disk.
  5. Hit Create a new key to add the key to Buddy

Adding existing SSH keysAdding existing SSH keys

Solving problems with SSH keys

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.

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. File ~/.ssh/config should contain an entry with our service:

     Host app.buddy.works
     HostName app.buddy.works
     User buddy
     IdentityFile ~/.ssh/id_rsa
  2. The SSH URL to your project looks like this (HTTP URL will not work):

     buddy@app.buddy.works:WORKSPACE/PROJECT
  3. The key has been added to the ssh-agent:

     ssh-add ~/.ssh/id_rsa
  4. The remote address has been properly configured in the repository. The local repository folder contains a hidden .git directory with 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.
    $$
If you again fail to authenticate, it means that the keys still don’t match. 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 - we’ll do our best to help you out.

Last modified on April 26, 2022

Get Started

Sign up for free and deploy your project in less than 10 minutes.