昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期三, 五月 14, 2014

git server on mac os over ssh

To set up git server on mac over ssh, you don't need extra tools. You will need ssh + git.

Once you set up a git repository on the server. 

you can git clone it over ssh.

But I got this problem:

1. git-upload-pack cannot be found

bash: git-upload-pack: command not found
fatal: Could not read from remote repository.

Reason:

The ssh environment is different to terminal. The PATH has different value which doesn't contains git's path.

Solution:

add a .bashrc file in the home folder. and add this lines

export PATH=/usr/local/git/bin:$PATH

2.  Symbol not found

dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
  Referenced from: /usr/local/git/bin/git-upload-pack
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___strlcpy_chk
  Referenced from: /usr/local/git/bin/git-upload-pack
  Expected in: /usr/lib/libSystem.B.dylib

Then I cannot resolve this issue. (should be able to resolve by the path as well)

Then I installed the xcode command line tool... and delete the bashrc. The problem gone...

So... the solution is install xcode command line tool.

Because xcode command line tool will install another version of git under /usr/bin folder. 

The git environment before is under /usr/local/git/bin, this version don't need to set the path.

--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.