Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do I replace /usr/bin/git?

I got the updated brew version downloaded already.



This is in the linked post.

Do this to disable it:

    sudo chmod -x /Applications/Xcode.app/Contents/Developer/usr/bin/git


  sudo cp /Applications/Xcode.app/Contents/Developer/usr/bin/git /somewhere/to/backup/just/in/case
  sudo rm /Applications/Xcode.app/Contents/Developer/usr/bin/git
  sudo ln -s /usr/local/bin/git /Applications/Xcode.app/Contents/Developer/usr/bin/git


Is the git binary where the vulnerability is... or is it in one of these:

  $ ls $(git --exec-path)


    chmod: /Applications/Xcode.app/Contents/Developer/usr/bin/git: No such file or directory
I don't have Xcode installed, do I have to install it back to do this?


If you do not have Xcode installed but do have the Command Line Tools, you will find the vulnerable git /Library/Developer/CommandLineTools/usr/bin/git

so the command would be:

  sudo chmod -x /Library/Developer/CommandLineTools/usr/bin/git


If you don't have Xcode installed then you don't have git.

IIRC, you might have a /usr/bin/git executable but that's not actually git, all it does is shows a GUI that prompts you to install XCode


Thanks.

Yea, /usr/bin/git is still there:

    $ git --version
    $ git version 2.6.4 (Apple Git-63)
But glad to know it won't do anything.


Try:

    % xcrun --find git


> IIRC, you might have a /usr/bin/git executable but that's not actually git, all it does is shows a GUI that prompts you to install XCode

wat


No, vulnerable git ships with Xcode.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: