0

I'm aware that this is probably a basic question, but I am new to both Git and command line. A colleague set up my mac to access a repository at work, but now I need to change it so that commits are under my name. His login details are also preventing me from accessing my own repository, giving me the 403 below:

remote: Permission to name/repo.git denied to aColleague. fatal: unable to access 'https://github.com/name/repo.git/': The requested URL returned error: 403

Any suggestions on how I can change this through the terminal please?

1 Answers1

0

It is a bit hard to say how he set what up, but generally you will have the URL and credentials encoded in .git/config. You could change it there, but a new checkout is easier. I suspect he also set up a SSH key to auto-login to the server. In that case you need to create a new SSH key (~yourmacuser/.ssh/id), and add the public part on the server (~youruser/.ssh/authorized_keys).

eckes
  • 10,103
  • 1
  • 59
  • 71
  • I couldn't find a way of accessing the config file via the command line, but could by changing the github.com settings in Applications > Utilties > Keychain Access. I also created a new SSH key as per https://help.github.com/articles/generating-ssh-keys/, but as I did this first I'm not sure if it was necessary? Thanks very much for your help. –  Jan 18 '15 at 21:13