Git .netrc file authentication issue

旧城冷巷雨未停 提交于 2019-12-03 21:06:39
VonC

The ~/.netrc (or %HOME%\_netrc on Windows) file isn't enough.

You would need to

  • copy the git-credential-netrc file anywhere in your $PATH/%PATH%,
  • add:

    cd yourRepo
    git config credential.helper "netrc -d -v"
    

(You can remove -d and -v once it is working: those are debug flags)

  • use your login in the remote URL:

    git set-url origin https://yourLogin@github.com/yourLogin/yourRepo
    

See "Git - How to use .netrc file on Windows to save user and password" for the general principle of a credential "netrc" helper (Git 1.8.3+).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!