命令行在使用时GitHub
(或者更确切地说,当我尝试执行时git push
)要求输入用户名和密码。在我这样做之后,以下崩溃:
Необработанное исключение: System.MissingMethodException: Метод не найден: "Void Microsoft.AzureRepos.AzureReposHostProvider..ctor(Microsoft.Git.CredentialManager.ICommandContext)".
в Microsoft.Git.CredentialManager.Program.Main(String[] args)
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/NikolajTrenirovki/SpinnerAndroidKotlin.git/'
通过单击链接https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently
,您可以发现您现在需要输入令牌而不是密码。问题是 ctrl c ctrl v 选项在这种情况下不起作用,命令行只是忽略插入并给出相同的错误(我也尝试手动输入,唉,结果相同)。
Важное уточнение
:我正在尝试为位于我的第二个 github 帐户中的存储库推送更改,我通过第一个帐户在 cmd 中获得授权(我将第一个帐户添加到共同作者,这在之前就足够了)
SSH 密钥通过 ssh 工作,在错误描述中您可以看到您拥有 https 协议。
git@github.com:user/project.git
通过以下格式更改指向 repo 的链接https 使用不同的密钥类型https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token。然后您打开密码存储
git config --global credential.helper store
并使用访问令牌而不是密码。附言 键入时不会绘制星号 - 盲目插入。