试图在OSX上安装git:cannont exec'git-credential-osxkeychain':权限被拒绝

tr3*_*ine 15 git macos installation

我正在尝试在我的新MBP上安装Git,并且正在关注文档@ https://help.github.com/articles/set-up-git.

它似乎在它说: If you do not have the helper, you can download it and copy it to /usr/local/bin

我导航到终端的/ usr/local/bin并做了一个sudo wget [链接到osxkeychain].当我尝试做一个git config --global credential.helper osxkeychain我得到一个fatal: cannont exec 'git-credential-osxkeychain': Permission denied.

我做错了什么?

谢谢!

TRE

pow*_*tac 25

git-credential-osxkeychain文件下载到桌面(!).
打开终端应用程序.
输入以下内容:

sudo cp  ~/Desktop/git-credential-osxkeychain /usr/local/bin/git-credential-osxkeychain  
sudo chmod 755 /usr/local/bin/git-credential-osxkeychain  
sudo git config --global credential.helper osxkeychain
Run Code Online (Sandbox Code Playgroud)

用以下方法测试:

sudo git credential-osxkeychain
Run Code Online (Sandbox Code Playgroud)

看到sudo前缀?它似乎是凭证的必要条件...它现在应该输出Usage: git credential-osxkeychain <get|store|erase>


nat*_*ill 13

使下载的文件可执行:

chmod 755 git-credential-osxkeychain
Run Code Online (Sandbox Code Playgroud)

  • 或者只是`chmod u + x git-credential-osxkeychain` (4认同)