1

I have listed my keys as the following:
gpg --list-secret-keys --keyid-format=long This is the out put:

sec   rsa4096/5A29604B3A3BGBC4 2022-01-27 [SC] [expires: 2024-01-27]
      2M793E9F59D5A9A11E6FCBB15D29601B3A8BFC4
uid                 [ultimate] avi fatal <avi.fatal@gmail.com>

This is how I introduce the key to git:
git config --global user.signingkey 5A29604B3A3BGBC4

Then I printed the GPG and copied to github GPG input:
pg --armor --export 5A29604B3A3BGBC4

when I try to clone the repo I get the error:

$ git clone git@github.com:the-user/the-repo.git
Cloning into 'the-repo'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Thanks

SexyMF
  • 10,657
  • 33
  • 102
  • 206
  • 3
    gpg is fine for signing commits and/or tags, but GitHub won't let you use it to access repositories. You're asking GitHub to access a repository via ssh; you'll need to set up an ssh key-pair. – torek Jan 27 '22 at 10:05
  • https://stackoverflow.com/search?q=%5Bgit%5D+Permission+denied+publickey – phd Jan 27 '22 at 14:50

0 Answers0