OSX上的Git挂在每个命令上:如何修复? [英] Git on OSX hangs on each command: How to fix it?

查看:78
本文介绍了OSX上的Git挂在每个命令上:如何修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行mac osx lion.

我的问题是我在每个命令中键入后git挂起.

如果我键入git,则得到Usage: git credential-osxkeychain <get|store|erase>

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

我如何使git工作?

解决方案

似乎使用您安装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

个人而言,我只使用 homebrew 及其与brew install git

I am running mac osx lion.

My problem is that git hangs after I type in each command.

If i type in git then I get Usage: git credential-osxkeychain <get|store|erase>

When I try to type in something else, for example git status the terminal just hangs, but once I hit enter again, then it goes back to the normal terminal prompt, but the command never goes through.

How do I get git to work?

解决方案

Seems with your specific approach to installing git, you might want to follow these instructions: 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

Personally, I just use homebrew and its as easy as brew install git

这篇关于OSX上的Git挂在每个命令上:如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆