git clone を ssh 越しにやったらエラーが出たので対処メモ。

エラーまでの軌跡

サーバ作業:

$ mkdir -p repos/test/bare
$ cd repos/test/bare
$ git --bare init

クライアント作業:

$ git clone machine:/home/user/repos/test/bare/ testdir
Initialized empty Git repository in /Users/user/Documents/projects/repos/test/testdir/.git/
bash: git-upload-pack: command not found
fatal: The remote end hung up unexpectedly

git-upload-pack なんてコマンドねーよって言われた。

クライアント側のパスはどう考えても問題なさそう。
サーバ側もパスは通ってるはずなんだけどナーと調べていくと、
どうも .bash_profile ではなくて .bashrc でパス通してあげる必要があるっぽい。

.bashrc でパス通す

サーバ作業:

$ vi ~/.bashrc
PATH=$PATH:/usr/local/git/bin

Mac 固有の問題なのかなー。

関連エントリー:

Mac + Subversion + インストール

MacPorts + インストール

ターミナル + Mac

Git 使い方アレコレ

Flask on Google App Engine

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt=""> <pre lang="" line="" escaped="" highlight="">