[英]PyCharm uses Git account from Credential Manager
On my Windows 10 machine I need to have two Git accounts and I have no idea how to setup it.在我的 Windows 10 机器上,我需要有两个 Git 帐户,但我不知道如何设置它。 I have read about setting different values at different projects but my problem is slightly different.
我已阅读有关在不同项目中设置不同值的信息,但我的问题略有不同。 So I use Git in my Visual (Git extension for VS 2017; and my boss authenticated once ater cloning repo with his acc) and in PyCharm (build in version control).
所以我在我的 Visual(VS 2017 的 Git 扩展;我的老板用他的 acc 进行了一次克隆 repo 的身份验证)和 PyCharm(内置版本控制)中使用了 Git。
When I want to push changes from Pycharm to my public Github repo I am getting error saying that my boss account is denied permission.当我想将更改从 Pycharm 推送到我的公共 Github 存储库时,我收到错误消息,说我的老板帐户被拒绝许可。 And after deleting it from Credential Manager, I can push, pull everything.
从 Credential Manager 中删除它后,我可以推送、拉取所有内容。
After switching to Visual and doing something Git related, there is a entry added to Credential Manager.在切换到 Visual 并执行与 Git 相关的操作后,凭据管理器中添加了一个条目。 And I am in loop.
我在循环中。 I need both things to work.
我需要这两件事来工作。
And I am in loop
我在循环中
Only if both remote repositories (the working one, and the public one) are both on GitHub.仅当两个远程存储库(工作存储库和公共存储库)都在 GitHub 上时。
Then the credential helper "manager" would only record one credential (username/password) for " github.com
".那么凭证助手“manager”将只记录一个“
github.com
”的凭证(用户名/密码)。
An alternative would be to use an SSH URL instead of an HTTPs one.另一种方法是使用 SSH URL 而不是 HTTPs 一个。
Then you could easily distinguish the credentials to use for each repository, as I mentioned in " How to set up authentication for two separate GitHub accounts from same ssh client? ".然后,您可以轻松区分用于每个存储库的凭据,正如我在“如何为来自同一 ssh 客户端的两个单独的 GitHub 帐户设置身份验证? ”中所述。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.