0

I am trying to push a text file to github and am getting the above error. I am using OSX 10.7.5 and git-1.8.4.2.

I have created a text file which I seem to be able to add and commit without problems. On my first attempt, I had the following error message:

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.

I spent some time researching this and found that this was a problem because my github repo had a readme file in it that was not on my local repo and I tried implementing both suggested solutions, cloning and pulling before pushing.

The cloning looked as though it was working:

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

But I still couldn't push. So then I deleted my directory and started again using pull, which gave virtually identical output:

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

But same problem with pushing:

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 

While it said everything was up-to-date, the file did not appear in my github'repo`.

Then I found the link on the stackoverflow question which had the link to the site dealing with caching your github password, which I tried to follow.

I typed

git credential-osxkeychain

which gave me the same error as I started with

I then tried to download the osxkeychain helper using the curl command:

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

I didn't get an error message for this, so I'm assuming it worked?

The next step was changing the permissions:

chmod u+x git-credential-osxkeychain

which again didn't give an error message

But I fell over at the next step:

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

where I got an illegal variable name message. Is this because dirname should actually be /user/local/git/? And should "which git" also be replaced by something else? I started getting pretty nervous at the point when I got the message:

`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.`

because I really had no idea what I was doing.

The TA on Coursera suggested just running

git config --global credential.helper osxkeychain

but now I get the error message twice instead of just once and still can't push.

I have also tried to find where my gitconfig file is since one of the suggestions is to delete your gitconfig file but only after checking it doesn't have anything else in it. It didn't show up on a normal search in finder so I assumed it is hidden and used defaults write com.apple.finder AppleShowAllFiles YES but without success. When I use alt Relaunch, Finder keeps opening with the Git package window that doesn't have a search option.

Sorry this is so long - Can anybody help me and explain what I need to do in very simple terms - assume I know nothing?

Also if you can explain why that would be incredibly helpful as I would like to understand how it works.

Community
  • 1
  • 1
Susan
  • 95
  • 1
  • 8
  • I eventually got round this problem by using my laptop which is running 10.9.5. Everything then worked as it should. So it seems to have been some sort of mismatch between git and the 1.7.5 operating system. Sadly, I am as ignorant as ever about git config files and the credential helper etc. But I did get my course assignment done. – Susan Apr 16 '15 at 06:03

1 Answers1

0

I am using the same Mac operating system and Git version as you and have been getting the same error messages when trying to push the HelloWorld.md file to my datasciencecoursera repo on Github. I finally got round this by deleting the repo on Github and making it again but without ticking the create README file, so its just a completely empty repository. I then deleted and recreated the directory I'd made on my local computer, remade the HelloWorld file and followed the course instructions again for initiating and linking the local/Github repositories and pushing the file to GitHub. The final command that worked for me was one the options suggested by GitHub when I set up the repo: git push -u origin master (after linking to the local repository). I still got the error messages, and got asked for my user name and password. I entered these (note that the password does not show up when you type it in...) and then got the error messages again but followed by detail:

error: git-credential-osxkeychain died of signal 11 error: git-credential-osxkeychain died of signal 11 Counting objects: 3, done. Writing objects: 100% (3/3), 244 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/keh444/datasciencecoursera.git * [new branch] master -> master Branch master set up to track remote branch master from origin.

When I looked on GitHub the HelloWorld file was in the repo, so it had worked.

While this may not have solved the problem in the long term at least I can now move on...

Karen
  • 1