간단한 http를 사용한 저장방법
- remote 저장소를 지정한다.
git remote add origin https://github.com/ ...
- git config 를 통해 origin.url에 저장된 url을 id와 pw를 넣어 변경한다.
git config remote.origin.url "https://<username>:<MYPASSWORD>@github.com/ ..."
- push를 해보면 로그인 과정없이 push되는 것을 볼 수 있다.
SSH를 사용한 저장방법
id와 pw를 paintext로 넣어두기 때문에 git config –list를 하게되면 모두 다 보이게 된다. 따라서 이를 다르게 설정해야할 필요가 있다.
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/ 참고