1

I am new to git and Github and I try to use it and learn simultaneously.

I have 2 Git repositories : one is created by me from scratch, another one is copied from someone and then linked/rerouted to my second repository. I understand that 'linked' or 'rerouted' are not precise git words. I did this because I did not want to wait for someone to give me permission to make changes in his repository.

If I issue command 'git remote -v' at the command prompt, the first repository gives me following output: origin https://github.com/XXX/ABCD.git (fetch) origin https://github.com/XXX/ABCD.git (push) I can commit to this repository, no issues.

For the second repository, I get - origin git@github.com:myloginname/XXX/PQRS (fetch) origin git@github.com:myloginname/XXX/PQRS (push)

I can add and commit locally in this repository but if I issue command 'git push origin', I get error - git@github.com: Permission denied (public key) fatal: could not read from repository.

I see that there is obviously difference between the two but I do not know how to rectify second one so that 'git push origin' succeeds.

Any inputs will be appreciated.

SSN
  • 11
  • 1

0 Answers0