Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 错误(internetKeychainItemForServer:withUsername:path:port:protocol:)-在密钥链中找不到指定的项_Git_Macos_Keychain_Atlassian Sourcetree - Fatal编程技术网

Git 错误(internetKeychainItemForServer:withUsername:path:port:protocol:)-在密钥链中找不到指定的项

Git 错误(internetKeychainItemForServer:withUsername:path:port:protocol:)-在密钥链中找不到指定的项,git,macos,keychain,atlassian-sourcetree,Git,Macos,Keychain,Atlassian Sourcetree,尝试使用Sourcetree将代码推送到github时,出现以下错误: Pushing to http://github.myOrg.com/my-repo/my-proj.git 2014-09-23 13:05:20.500 git-credential-sourcetree[6744:507] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could n

尝试使用Sourcetree将代码推送到github时,出现以下错误:

Pushing to http://github.myOrg.com/my-repo/my-proj.git
2014-09-23 13:05:20.500 git-credential-sourcetree[6744:507] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.
remote: Permission to ion-my-repo/my-proj.git denied to my-user-id.
fatal: unable to access 'http://github.myOrg.com/my-repo/my-proj.git/': The requested URL returned error: 403
当我点击push时,sourcetree会询问我与我的帐户相关的密码:

Password required
For user my-user-id on host github.myOrg.com
所以看起来sourcetree知道我的用户id是什么,它只需要密码就可以访问我的github帐户。我可以使用sourcetree提取内容,它不要求我提供凭据。我也可以推动这个项目,但最近我的系统管理员在我的mac上用钥匙链做了一些事情,从那时起我就不能在github上推动任何东西


以前有人遇到过这个问题吗

我也有同样的问题。看来
ssh
agent不知何故丢失了我的凭据。当我尝试使用
终端列出所有ssh密钥时,我意识到了这一点:

$ ssh-add -l
> The agent has no identities.
所以我跑了

$ ssh-add ~/.ssh/my_rsa_key
我输入了钥匙的密码。这个问题就消失了

因此,我不知道我的ssh代理突然丢失其密钥的确切原因或方式,但如果这与您遇到的问题相同,您可以通过使用
ssh add
命令重新添加ssh密钥来解决


这可能是有许多不同原因和解决方案的问题之一,我只是为我的案例提出了一个解决方案。

由于“双因素身份验证”,我得到了相同的错误。 使用“双因素身份验证”后,您必须创建个人访问令牌,在通过HTTPS执行Git操作时,您应该输入该令牌而不是密码。

我手动将凭据添加到keychain,这似乎有效。您能告诉我们如何操作吗?在keychain中:在“密码”类别中添加“bitbucket.org”条目。我认为您对该项目的访问权限已被删除admin@tech_human嗨,我和你有同样的问题。我悬赏你的问题。jfcartier的回答为我解决了这个问题。你试过他的解决方案了吗?对我来说很有效!奇怪的是,如果我打开
keychainaccess
并搜索
ssh
,我可以在那里看到密钥。实际上是ssh代理没有它。