Wednesday, October 10, 2012

Create a new repository and add ssh login for the command line so you don't have to type your password every time you do a git push


Create a new repository and add ssh login for the command line so you don't have to type your password every time you do a git push

1) Create new repository on github
2) Create a new repository on the command line


touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:scubafly/<reponame>.git
git push -u origin master


To create a new ssh rya key pair if needed see https://help.github.com/articles/generating-ssh-keys

after that you can use the following to log in once per terminal without reentering the username and pass all the time...

In the terminal enter:
3) ssh-agent bash
4) ssh-add
5) enter passphrase

No comments:

Post a Comment