[英]Microsoft Git-Credential-Manager
I'm using Microsoft Git-Credential-Manager for Linux (Ubuntu) for a couple weeks, with some credentials, and now I need to push modifications to a different repo with different credentials.我使用Microsoft Git-Credential-Manager for Linux (Ubuntu) 几个星期,有一些凭据,现在我需要将修改推送到具有不同凭据的不同存储库。 But I can't do this, because GCM is trying to use incorrect data to access this repository.
但我不能这样做,因为 GCM 试图使用不正确的数据来访问这个存储库。
How do I change these or add new ones in order to be able to commit to different repos with different credentials?我如何更改这些或添加新的,以便能够使用不同的凭据提交不同的存储库? Is it possible?
是否可以?
You can use git credential manager command to delete the entry for a given remote host.您可以使用git credential manager 命令删除给定远程主机的条目。
git credential-manager reject <url>
Once the entry is deleted, you would be able to store new credentials.删除条目后,您将能够存储新凭据。
You can store ( git credential-manager store
) one credential per host and user: that will be valid for all repos owned by said user.您可以为每个主机和用户存储(
git credential-manager store
)一个凭证:这对所述用户拥有的所有git credential-manager store
都有效。
For a credential per repository, as seen in Git-Credential-Manager-for-Windows/issue 749 , use (for Windows or Linux) the git config credential.useHttpPath
, explained in git credentials .对于每个存储库的凭证,如Git-Credential-Manager-for-Windows/issue 749 中所见,使用(对于 Windows 或 Linux) git config
credential.useHttpPath
, 在 git credentials 中进行了解释。
git config --global credential.useHttpPath true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.