我正在使用几个存储库,但最近我只是在内部工作,一切都很棒.
今天我不得不承诺并将代码推送到其他代码中,但我遇到了一些麻烦.
$ git push appharbor master
error: The requested URL returned error: 403 while accessing https://gavekortet@appharbor.com/mitivo.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
我无能为力,这将再次带来密码输入.
如何重置系统上的凭据,以便Git会询问我该存储库的密码?
我试过了:
git config --global --unset core.askpass
为了取消设置密码
git config credential.helper 'cache --timeout=1'
为了避免凭证缓存......
似乎没有任何作用; 有没有人有更好的主意?
我正在尝试使用个人访问令牌与GitHub进行身份验证.在github的帮助文件中,它声明使用curl方法进行身份验证(https://help.github.com/articles/creating-an-access-token-for-command-line-use).我试过这个,但我仍然无法推送给GitHub.请注意,我正试图从未经身份验证的服务器(Travis-CI)推出.
cd $HOME
git config --global user.email "emailaddress@yahoo.com"
git config --global user.name "username"
curl -u "username:<MYTOKEN>" https://github.com/username/ol3-1.git
git clone --branch=gh-pages https://github.com/username/ol3-1.git gh-pages
cd gh-pages
mkdir buildtest
cd buildtest
touch asdf.asdf
git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to gh-pages"
git push -fq origin gh-pages
Run Code Online (Sandbox Code Playgroud)
此代码导致错误:
remote:匿名访问scuzzlebuzzle/ol3-1.git被拒绝.
致命:" https://github.com/scuzzlebuzzle/ol3-1.git/ "的身份验证失败
谢谢