I have working gitosis repo. If I do
git clone git@server:repo.git
it clones the repo correctly. However, it does not work if I do:
git clone ssh://git@server:repo.git
Cloning into repo...
ssh: connect to host port 22: Connection refused
fatal: The remote end hung up unexpectedly
The problem is that when I use pip
I I do:
pip install git+ssh://git@server:repo.git
and of course yields:
Cloning into repo...
ssh: connect to host port 22: Connection refused
fatal: The remote end hung up unexpectedly
If I want to do:
pip install git+git@server:repo.git
I get
ValueError: ('Expected version spec in', 'git+git@server:repo.git', 'at', '+git@server:repo.git')
Is there a way to have pip or gitosis configured so I can make it work?
Thanks,
(please avoid 'use gitolite', I would if I could)
I would rather use the ssh uri syntax (rather than the SCP syntax)
git clone git+ssh://git@server/repo.git
To install, you should only have to run:
pip install git+git://host/path_to_repo/repo.git
So for your example:
pip install git+git://server/path_to_repo/repo.git
来源:https://stackoverflow.com/questions/9817976/pip-install-from-a-gitosis