避免每次提交改动时输入用户名和密码,可以使用下列命令:
$ git config credential.helper store
$ git push https://github.com/username/repo.git
参考资料:
Git push: username, password, how to avoid?。
另一个通过~/.netrc
文件的方法(参考stackoverflow):
$ cat ~/.netrc
machine github.com login lot105 password howsyafather