Skip to content

Instantly share code, notes, and snippets.

@naiieandrade
Created April 16, 2018 23:33
Show Gist options
  • Save naiieandrade/c79e9d5e9be9390e82b6824bd46cff60 to your computer and use it in GitHub Desktop.
Save naiieandrade/c79e9d5e9be9390e82b6824bd46cff60 to your computer and use it in GitHub Desktop.
How to clone repository - SSH

I have a problem theses day when I trying clone a repository in Pagure, but in SSH. Was my first time doing this, and I received this message:

Cloning into 'project'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

This is a gist for me, for help me next time.

First, I have to create my SSH private and public with the command:

ssh-keygen

Is asked you for a name for file. For example: myssh Then is created your private and public key. With ls

myssh myssh.pub

After you can check your list if contains your private ssh

ssh-add -l

If you don't have : The agent has no identities.

You add your private ssh

ssh-add myssh

And try clone again. (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment