1

I want to clone a repository and I ran into permission issues, I tried to set up my username and email but keep getting errors

I used

git config --global user.name "yusuf-uthman"
git config --global user.email "yusufuthman57@gmail.com"

but didnt get any notification wether its accepted or not.

Uthman@DESKTOP-30QGK3L MINGW64 ~/Desktop/Scripts/hng_internship5.0
$ git config --global user.name "Uthman Yusuf"

Uthman@DESKTOP-30QGK3L MINGW64 ~/Desktop/Scripts/hng_internship5.0
$ git config --global user.email "yusufuthman57@gmail.com"

Uthman@DESKTOP-30QGK3L MINGW64 ~/Desktop/Scripts/hng_internship5.0
$ git clone git@github.com:yusuf-uthman/hng-internship.git
Cloning into 'hng-internship'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
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.

I expect to have permission and be able to clone the repository, I'm sure the repository exists because I just created it, I will appreciate any help

kowsky
  • 9,868
  • 1
  • 27
  • 39
Uthman
  • 21
  • 1
  • 1
  • 4
  • 1
    Seems like a permission issue. https://stackoverflow.com/questions/2643502/how-to-solve-permission-denied-publickey-error-when-using-git – Mebin Joe Apr 01 '19 at 07:29
  • 2
    Possible duplicate of [How to solve Permission denied (publickey) error when using Git?](https://stackoverflow.com/questions/2643502/how-to-solve-permission-denied-publickey-error-when-using-git) – Chris Maes Apr 01 '19 at 07:30

2 Answers2

1

but didnt get any notification wether its accepted or not.

Username and Email are just settings in you git config file, no one will accept or decline it. If you commit, the value of the settings will be used to determine the commits author and committer.

Access rights to a repository are usually managed via ssh keys. See Connecting to GitHub with SSH.

kowsky
  • 9,868
  • 1
  • 27
  • 39
0

It looks like you are cloning your github repo via SSH URLs (for this you need to add your public SSH key in your repository)

Use HTTP URL method to clone and then IMO you'll be able to clone it on your local.

Format: - SSH URLs: git clone git@github.com:yusuf-uthman/hng-internship.git - HTTP URLs: https://github.com/yusuf-uthman/hng-internship.git

Oli
  • 461
  • 6
  • 14
  • This answer worked for me. I was using SSH cloning link instead of HTTP , the moment I tried http url it worked immediately.. Thanks and apologies for the late reply – Uthman Apr 29 '19 at 22:30