简体   繁体   English

PyCharm 使用来自凭据管理器的 Git 帐户

[英]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.

相关问题 Jenkins无法从Windows凭据管理器检测到GIT凭据 - Jenkins does not detect GIT credentials from Windows Credential manager Git - 缓慢获取 - 凭证管理器主机提供程序 - Git - slow fetch - credential manager host providers 如何在 Windows 的 Git Credential Manager 中的每个 repo 本地存储凭据? - How to store credentials locally per repo in Git Credential Manager for Windows? 清除 git-credential-manager-core 缓存登录 - Clear git-credential-manager-core cached login 从凭据管理器中删除 Windows 上所有用户的条目 - Remove an entry from credential manager for all users on Windows 使用 CMD 从 Windows 凭据管理器中检索密码 - Retrieving password from Windows Credential Manager using CMD 从 Windows 凭据管理器读取凭据时,keyring.get_password() 抛出 NameError - keyring.get_password() throws NameError when reading credential from Windows Credential Manager 使用 Java 中的 windows 凭据管理器获取凭据,用于身份验证进入 git 和其他服务 - Use the windows credential manager in Java to get credentials for authentication into git and other services Mobaxterm终端中的Git凭证 - Git credential in Mobaxterm terminal 禁用单个应用程序的凭据管理器 - Disable credential manager for single application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM