【发布时间】:2021-03-31 03:10:42
【问题描述】:
这就是为什么我不得不面对这两个因素的问题:the GitHub announcement
【问题讨论】:
标签: linux git ubuntu github two-factor-authentication
这就是为什么我不得不面对这两个因素的问题:the GitHub announcement
【问题讨论】:
标签: linux git ubuntu github two-factor-authentication
我已经看到很多关于这个问题的链接,但是由于信息分散,我决定总结一下对我有用的步骤。
首先,这是我在how to set the two-factor security in github.com找到的最佳链接
这是我为我的令牌设置的(如果您选择的权限少于所需的权限,则访问也会失败,无论令牌是否正常)
这里的关键是使用新令牌代替您的用户密码。但是因为我只是从我的 github.com 存储库中获取所有更改,所以我将凭据保存在本地。我必须承认这是不推荐的,因为安全性(在 Linux 中,这是以纯文本设置的,这是一种非常糟糕的做法),但是我们开始...
这里是关于how to set git credentials on local的链接
现在,您必须在此处设置凭据:文件是 ~/.git-credentials
yyyyyy@xxxxxx:~$ cat .git-credentials
https://put-your-github-user-here:put-yout-token-here@github.com
Another example on what to do in this file
这是link about the format for this file
设置完所有这些东西后,尝试检查 repo 状态或获取本地的任何更改。
【讨论】: