1

I have a Mac with a bash terminal, Vagrant, and had it set up with a GitHub account that was associated with a programming company/class and now that I'm not longer a part of that, I need to switch my username and password to a new github account. I don't need to reload the existing repository, and I already made a new one under a different account, but I can't push anything until I get my new password added. I don't know the commands for putting in my password. I followed this: https://help.github.com/articles/set-up-git

But it doesn't tell me how to set up my password. Also, the way it was set up before, I just had to do git add, git commit -m"", and git push origin master to push files into a repository. I think I might have a password manager or something like that installed but I'm not sure how to go about changing that. I can't add the new repository until I get the password set up.

Holger Just
  • 52,918
  • 14
  • 115
  • 123

1 Answers1

0

It sounds like what you want to do is connect your Mac to a different github account. If this is the case, you'd simply delete your SSH key from your old company/class from your "old" github account and upload your SSH key on your Mac to your other github account.

Once you do that, everything else should Just Work.™

You may also need to change some of the settings in your ~/.gitconfig file, as that is where your username and email address is stored at a global level.

CDub
  • 13,146
  • 4
  • 51
  • 68
  • is that like doing this? http://stackoverflow.com/questions/14762034/push-to-github-without-password-using-ssh-key I'm not sure I know what the ssh key is (or does) so I'm not sure how to change it. I haven't been typing in the github.com stuff like in the link above. Thanks for the response! –  Feb 27 '14 at 22:32
  • OK that link helped, thank you! but when I try the clip < ~/.ssh/id_rsa.pub command it says " clip: command not found" it produced the key fingerprint and the key's randomart image, but that command won't work. –  Feb 27 '14 at 23:39
  • 1
    Not sure what "clip" is - do you mean `pbcopy`? – CDub Feb 28 '14 at 00:32
  • that link says to: Step 3: Add your SSH key to GitHub Run the following code to copy the key to your clipboard. clip < ~/.ssh/id_rsa.pub # Copies the contents of the id_rsa.pub file to your clipboard and that's the part where it says the command is not found. Thank you again so much for still responding. I really do appreciate it. –  Feb 28 '14 at 01:17
  • Interesting - what I see is this command: `pbcopy < ~/.ssh/id_rsa.pub` – CDub Feb 28 '14 at 01:18
  • Ah, you somehow were looking at the Windows instructions... Make sure you're looking at the Mac instructions. :) – CDub Feb 28 '14 at 01:19