我正在与几个仓库合作,但最近我只是在内部工作,而且都很棒。从Git中删除凭证
今天我不得不承诺并将代码推入其他代码,但我遇到了一些麻烦。
$ git push appharbor master
error: The requested URL returned error: 403 while accessing https://[email protected]/mitivo.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
没有什么我可以做的,那会再次输入密码。
如何重置我的系统上的凭据,以便Git会询问我该存储库的密码?
我曾尝试:
git config --global --unset core.askpass
以取消设置密码
git config credential.helper 'cache --timeout=1'
为了避免凭证高速缓存...
似乎没有任何工作;有没有人有更好的主意?
你有'〜/ .netrc'文件吗? – robinst
@robinst它是一台Windows机器,我找不到该文件,甚至没有从Git Bash中获得... – balexandre
@balexandre对于Windows机器,我更喜欢使用新的(git 1.8.3)证书助手'netrc',这会将*多个*凭证存储在*加密的*文件中。每次会话都要输入密码,因为缓存只能“缓存”密码一段时间。看到一个[完整的例子在这里](http://stackoverflow.com/a/18362082/6309)。 – VonC