如何使用密码推送自己的github主旨,无TFA?

问题描述:

所以,我已经试过在github在我自己的用户名设置一个要点:如何使用密码推送自己的github主旨,无TFA?

...我试图克隆,编辑和推动这一要点。我的个人资料/编辑个人资料/安全性(github.com/settings/security)中没有启用双因素身份验证(2FA)。

我想克隆这个回购,所以当我推,我用我的GitHub密码进行身份验证,而不是与personal access token;我也想避免为SSH访问创建公钥。

这是我目前可以观察到:刚刚

cd /tmp/ 
$ git clone https://[email protected]/771e0ca9b9f1fa17464373266400386f.git yet_another_git_tute_gist 
Cloning into 'yet_another_git_tute_gist'... 
remote: Counting objects: 3, done. 
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 
Unpacking objects: 100% (3/3), done. 
Checking connectivity... done. 

因此,克隆时,即使我在HTTPS URL指定了用户名,我不会被要求输入密码,仓库被克隆。这是推前变化的一个例子:

cd yet_another_git_tute_gist/ 

git config user.name sdaau 
git config user.email [email protected] 

echo >> README.md # just add empty line 
git add README.md 
git commit -m 'testing' 
# [master 0f958d5] testing 
# 1 file changed, 1 insertion(+) 

...这是推:

$ git push --all 
Password for 'https://[email protected]': 
remote: Invalid username or password. 
fatal: Authentication failed for 'https://[email protected]/771e0ca9b9f1fa17464373266400386f.git/' 

会有人知道我在做什么错?

哦,再克隆半小时后,改变并得到推错误,就像我在写这个问题,最终还是成功了:

$ git push --all 
Password for 'https://[email protected]': 
Counting objects: 5, done. 
Writing objects: 100% (3/3), 246 bytes | 0 bytes/s, done. 
Total 3 (delta 0), reused 0 (delta 0) 
To https://[email protected]/771e0ca9b9f1fa17464373266400386f.git 
    b706450..0f958d5 master -> master 

...所以我猜我没有正确输入密码。尽管如此,让我们继续保持这个Q/A在线,因为我没有找到像这样一个完全措辞的例子(并且我找到了一个,我可能会尝试更难以输入正确的密码)。


自我提醒:remote: Gist does not support directories.