linux git保存用户名密码(避免每次push输用户名密码)

Linux/Unix/Mac 系统

新建一个 ~/.netrc 文件, 将 git 服务器, 用户名以及密码记录在这个文件, 如下所示:

  1.  
    machine your-git- server
  2.  
    login your-username
  3.  
    password your-password

普通用户的 git-server 填 github.com 就可以了.

如果有多个 server 就重复上面的三行, 分别输入对应的服务器、 用户名和密码即可.

猜你喜欢

转载自www.cnblogs.com/lvcisco/p/9274379.html