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