我遇到了一种奇怪的情况,我不知道如何才能推送到回购。
我有两个repos,一个是公开的,另一个是公司的Github Enterprise。我刚刚从企业一号克隆了一个HTTPs repo链接,一切正常,这通常不需要任何凭证。
然而,当我意识到我也可以推送时,我开始想知道凭据存储在哪里。我查了.git/config
remote "origin"]
url = https://mygithub.blablacompany.com/blablaUsername/blabla.git
fetch = +refs/heads/*:refs/remotes/origin/*然后我查看了git config --list,列出了一堆其他的存储库用户名,还有:
remote.origin.url=https://mygithub.blablacompany.com/blablaUsername/blabla.git
remote.origin.fetch=+refs/heads/*:refs
branch.master.remote=origin
branch.master.merge=refs/heads/master然后我检查了主文件夹中是否存在./git-credentials。不,它不是。我在本地硬盘上找过了,根本不存在。
然后我检查了windows的git凭据管理器是否存在:
> git credential-manager version
> Git Credential Manager for Windows version 1.6.1好吧,所以我假设它存储在Windows凭据中。但是当我转到用户凭证时,我看不到任何记录,也看不到任何关于git的信息。
我尝试运行git config credential.helper,它返回:
!github --credentials因此,我假设感叹号后面的所有内容都是shell命令。好的,我试着检查/Users/Me下的全局配置
有一个,但它完全是为另一个,非企业回购。
那么我怎么才能推送到这个回购呢?如何跟踪密码/ssh密钥的存储位置?
发布于 2020-10-15 19:37:03
您可以使用以下命令查看所有Git设置、文件和文件位置:
git config --list --show-origin
https://stackoverflow.com/questions/64217017
复制相似问题