Abh*_*ogi 22 git version-control push github
我的回购:https://shadyabhi@github.com/shadyabhi/learnajax.git
shadyabhi@archlinux-N210 ~/github/learnajax $ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://shadyabhi@github.com/shadyabhi/learnajax.git
fetch = +refs/heads/*:refs/remotes/origin/*
shadyabhi@archlinux-N210 ~/github/learnajax $ git config -l
user.name=shadyabhi
user.email=abhijeet.1989@gmail.com
merge.tool=vimdiff
github.token=1095de7027bVVVV01cfAAAAAa5fc8f6
color.ui=auto
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://shadyabhi@github.com/shadyabhi/learnajax.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
shadyabhi@archlinux-N210 ~/github/learnajax $ git push -u origin master
Password:
fatal: Authentication failed
shadyabhi@archlinux-N210 ~/github/learnajax $
Run Code Online (Sandbox Code Playgroud)
现在,我无法进入我的回购.我已经检查了github.token与我的帐户设置相同.Ofcoarse,我输入正确的密码,但我收到此错误.
小智 73
我有一个类似的问题,用正确的用户和密码来推动我的起源.事实证明,我已经开启了双因素身份验证而忘记了.如果您启用了双因素身份验证,则需要创建一个特定于应用程序的密码来推送您的仓库.https://help.github.com/articles/creating-an-access-token-for-command-line-use
Abh*_*ogi 10
如果用户名包含"某些"特殊字符,则存在一些问题(如果使用https).
据我了解,git HTTP传输不使用github.token(和github.user) - 它们只适用于使用GitHub API的其他工具,例如GitX和GitNub.
我认为"身份验证失败"错误必定是由于您输入了错误的密码.(这应该是您的GitHub密码,而不是SSH私钥的密码.)
我刚才遇到了同样的问题.显然,当您在命令行中使用git时,它希望您输入访问令牌而不是密码.这真的很奇怪,但它确实有效.
$ git push origin HEAD
Username for 'https://github.com': <--- your username here
Password for 'https://t7ko@github.com': <--- access token here O_O
Run Code Online (Sandbox Code Playgroud)
PS:这是关于创建令牌的说明:https://help.github.com/articles/creating-an-access-token-for-command-line-use
| 归档时间: |
|
| 查看次数: |
38738 次 |
| 最近记录: |