Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Friday, July 19, 2013

Running SSH on Windows

Setting up SSH on Windows for GitHub

  1. Create a ".ssh" folder in your home directory.
  2. Use Puttygen.exe to create ssh-rsa keys.
  3. Save the public key as %HOME%/.ssh/id_rsa.pub
  4. Save the private key as %HOME%/.ssh/id_rsa
  5. Edit the id_rsa.pub file by removing the comment and replacing with "ssh-rsa". Make sure it is one single line. It should look like:
    • ssh-rsa AAABSLDFEISELslghkjsesoi ...... yourname@email.com
  6. Login to GitHub and add the contents of id_rsa.pub as one of the security keys.

See this site on instructions on how to use Puttygen.exe to create keys.

Saturday, July 6, 2013

Change the origin of git repo

If the origin already exists, you can point to another repo as follows:
  git remote set-url origin git@github.com:username/repo.git 

If you've initialized a local repo and want to push to github, do the following:
  git remote add origin git@github.com:hoekit/vimrc.git
  git pull origin master
  git push --set-upstream origin master