OSX 上的 Git 在每个命令上挂起:如何修复它?

are*_*eke 4 git

我正在运行 mac osx lion。

我的问题是 git 在我输入每个命令后挂起。

如果我输入git然后我得到Usage: git credential-osxkeychain <get|store|erase>

当我尝试输入其他内容时,例如git status终端只是挂起,但是一旦我再次按回车键,它就会返回到正常的终端提示符,但该命令永远不会执行。

我如何让 git 工作?

jdi*_*jdi 5

似乎您安装 git 的具体方法,您可能需要遵循以下说明: https ://help.github.com/articles/set-up-git

# Test for the cred helper
git credential-osxkeychain

# Download the helper
curl -s -O \
  http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain

# Fix the permissions on the file so it can be run
chmod u+x git-credential-osxkeychain

# Now you need to install the helper into the 
# same directory where Git itself is installed.

# Find where git is installed
which git

# Move the file to the path `which git` returned so git can access it
sudo mv git-credential-osxkeychain /usr/local/git/bin/

# Set git to use the osxkeychain credential helper
git config --global credential.helper osxkeychain
Run Code Online (Sandbox Code Playgroud)

就我个人而言,我只是使用homebrew它,就像brew install git

  • 当我执行“git config --global credential.helper osxkeychain”时,它仍然挂起。 (3认同)