我可以在同一本地系统中使用多个GIT帐户(在凭证管理器中)

发布于 01-22 07:48 字数 130 浏览 6 评论 0原文

当我尝试获取最近创建的分支时,它向我显示了remote:找不到存储库。

这是因为我早些时最近创建了

我的担心是,是否可以在凭据管理器列表中拥有多个GIT帐户? 如果有人知道,请提前回答我:)

While I'm trying to fetch branch which is recently created , it shows me remote: Repository not found.

That's because of earlier I have added different account in Credential Manager , which is not belonging to the repo which is recently created

My concern is , is it possible to have multiple git accounts in Credential Manager list ?
If anyone knows please answer me, thanks in advance:)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅气尐潴2025-01-29 07:48:16

我不确定您是否可以在全球凭据中具有多个凭据
但是您可以为存储库本身使用特定的凭据:

两种方法:

1-
配置项目的凭据,这不是全局:

git config credential.${remote}.username yourusername

那么,当您推动此用户时,将不是全局。

2 - 忘记旧保存的凭据:

git credential-cache exit

运行此命令后,如果您尝试按下,它将要求您提供用户名和密码。

I am not sure if you can have multiple credentials in the Global Credential
But you can use a specific credential for the repository itself:

Two ways to do it:

1-
Config the credential of the project, this is not global:

git config credential.${remote}.username yourusername

Then, when you push this user will be used not the global.

2- Forget old saved credentials:

git credential-cache exit

After running this command, if you try to push, it will ask you for username and password.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文