错误:git-credential-osxkeychain死于信号11 - 无法理解答案

时间:2015-04-12 00:08:45

标签: macos git

我正在尝试将文本文件推送到github并收到上述错误。我使用的是OSX 10.7.5git-1.8.4.2

我创建了一个文本文件,我似乎能够毫无问题地添加和提交。在我第一次尝试时,我收到以下错误消息:

warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

error: `git-credential-osxkeychain died of signal 11`
Username for `'https://github.com'`: Anto58
Password for `'https://Anto58@github.com'`: 
error: `git-credential-osxkeychain` died of signal 11
To `https://github.com/Anto58/datasciencecoursera.git`
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to `'https://github.com/Anto58/datasciencecoursera.git'`
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我花了一些时间研究这个并发现这是一个问题,因为我的github repo中有一个readme文件,而不是我本地的repo和我尝试在推送之前实施建议的解决方案,克隆和拉动。

克隆看起来好像有效:

Cloning into 'coursera-repo'...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done

但我仍然无法推动。然后我删除了我的目录,并再次使用pull启动,这提供了几乎相同的输出:

remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From `https://github.com/Anto58/datasciencecoursera`
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master

但推动同样的问题:

error: `git-credential-osxkeychain` died of signal 11
Username for `'https://github.com'`: Anto58
Password for `'https://Anto58@github.com'`: 
error: `git-credential-osxkeychain` died of signal 11
Everything up-to-date 

虽然它说一切都是最新的,但该文件没有出现在我的github'回购邮件中。

然后我在stackoverflow question上找到了指向该网站链接的链接,用于缓存您的github密码,我试图遵循该密码。

我打字

git credential-osxkeychain

给了我与

开头相同的错误

然后我尝试使用curl命令下载osxkeychain帮助程序:

`curl -s -O \
? https://github-media-downloads.s3.amazonaws.com/osx/git-dredential-osxkeychain` 

我没有收到错误消息,所以我认为它有用吗?

下一步是更改权限:

chmod u+x git-credential-osxkeychain

再次没有给出错误消息

但是我在下一步摔倒了:

sudo mv git-credential-osxkeychain \
"$(dirname $(which git))/git-credential-osxkeychain"`

我得到illegal variable name message。这是因为dirname实际应该是/user/local/git/吗?并且“哪个git”也应该被其他东西取代?当我收到消息时,我开始变得非常紧张:

`WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.`
因为我真的不知道自己在做什么。

Coursera上的TA建议只运行

git config --global credential.helper osxkeychain

但现在我收到错误消息两次而不是一次仍然无法推送。

我还试图查找我的gitconfig文件的位置,因为其中一个建议是删除gitconfig文件,但只有在检查后才有其他内容。它没有显示在finder中的正常搜索中,所以我认为它被隐藏并使用defaults write com.apple.finder AppleShowAllFiles YES但没有成功。当我使用alt重新启动时,Finder会继续打开没有搜索选项的Git包窗口。

对不起,这太久了 - 任何人都可以帮助我并用非常简单的术语解释我需要做什么 - 假设我什么都不知道?

另外,如果你能解释为什么那会非常有用,因为我想了解它是如何运作的。

1 个答案:

答案 0 :(得分:0)

我正在使用与您相同的Mac操作系统和Git版本,并且在尝试将HelloWorld.md文件推送到Github上的datasciencecoursera repo时收到了相同的错误消息。我终于通过删除Github上的repo并重新创建它而没有勾选create README文件来解决这个问题,所以它只是一个完全空的存储库。然后我删除并重新创建了我在本地计算机上创建的目录,重新创建了HelloWorld文件并再次按照课程说明启动和链接本地/ Github存储库并将文件推送到GitHub。对我有用的最后一个命令是GitHub在我设置repo时建议的选项:git push -u origin master(在链接到本地​​存储库之后)。我仍然收到错误消息,并询问我的用户名和密码。我输入了这些(请注意,当您输入密码时,密码不会显示...)然后再次收到错误消息,但后面跟着详细信息:

错误:git-credential-osxkeychain死于信号11 错误:git-credential-osxkeychain死于信号11 计数对象:3,完成。 写入对象:100%(3/3),244字节| 0字节/秒,完成。 总计3(delta 0),重复使用0(delta 0) 至https://github.com/keh444/datasciencecoursera.git  * [new branch] master - >主 分支主站设置为从原点跟踪远程分支主站。

当我查看GitHub时,HelloWorld文件在repo中,所以它有效。

虽然从长远来看这可能无法解决问题,至少我现在可以继续......