在服务端进行Git操作时,不像开发环境使用GUI一样,可以直接提示记住认证信息,所以需要显示的去配置,如下:
$ git config credential.helper store
$ git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>
[several days later]
$ git push http://example.com/repo.git
[your credentials are used automatically]
Reference:https://git-scm.com/docs/git-credential-store