Registration in the git hub, git and the repository problem

I want to make a repository in GitHub for the first time and now it gives me this error

Username for 'https://github.com': ******`enter username here`
Password for 'https://[email protected]': `enter password here`
remote: Permission to MErfanPld/web.git denied to MErfanPld.
fatal: unable to access 'https://github.com/MErfanPld/web.git/': The requested URL returned error: 403

Thank you for your help

Upvotes: 0

Views: 131

Answers (1)

BobyCloud
BobyCloud

Reputation: 284

There are two ways you can access Github repositories when they are private.

  1. HTTPS
  2. SSH

I recommend the second method, You must create an ssh key using the command below

ssh-keygen

Now You can print Your ssh public key using the command bellow in Linux

cat ~/.ssh/id_rsa.pub

Use this link as a hint to manage your ssh keys.

Finally, you need to add your public ssh key into GitHub, Github explains this here with a picture guide. Now through ssh public key and without the need to log in with a username and password every single time, You can access your private repositories in a secure way.

Best regards

Upvotes: 1

Related Questions