相关疑难解决方法(0)

从Git中删除凭据

我正在使用几个存储库,但最近我只是在内部工作,一切都很棒.

今天我不得不承诺并将代码推送到其他代码中,但我遇到了一些麻烦.

$ 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'

为了避免凭证缓存......

似乎没有任何作用; 有没有人有更好的主意?

windows git credentials

522
推荐指数
29
解决办法
63万
查看次数

使用令牌使用GitHub进行身份验证

我正在尝试使用个人访问令牌与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/ "的身份验证失败

谢谢

github github-pages

93
推荐指数
20
解决办法
16万
查看次数

标签 统计

credentials ×1

git ×1

github ×1

github-pages ×1

windows ×1