2014-11-17 13 views
15

Mam własny hosted gitlab i chciałbym zainstalować pakiet hostowany tam za pomocą ssh.Czy można użyć pip, aby zainstalować pakiet przez ssh w samoobsługowym gitlabie?

Próbowałem:

pip install git+ssh://[email protected]<my_domain>:se7entyse7en/<project_name>.git 

Oto wynik:

Downloading/unpacking git+ssh://[email protected]<my_domain>:se7entyse7en/<project_name>.git 
Cloning ssh://[email protected]<my_domain>:se7entyse7en/<project_name>.git to /var/folders/3r/v7swlvdn2p7_wyh9wj90td2m0000gn/T/pip-4_JdRU-build 
ssh: Could not resolve hostname <my_domain>:se7entyse7en: nodename nor servname provided, or not known 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights and the repository exists. 

Aktualizacja:

Próbowałem przesłać go na gitlab.com i po przesłaniu repo próbowałem zainstalować go, uruchamiając:

pip install git+ssh://[email protected]:loumarvincaraig/<project_name>.git 

ale nic się nie zmieniło. W szczególności oto treść pip.log:


/Users/se7entyse7en/Envs/test/bin/pip run on Mon Nov 17 22:14:51 2014 
Downloading/unpacking git+ssh://[email protected]:loumarvincaraig/<project_name>.git 

Cloning ssh://[email protected]:loumarvincaraig/<project_name>.git to /var/folders/3r/v7swlvdn2p7_wyh9wj90td2m0000gn/T/pip-91JVFi-build 

Found command 'git' at '/usr/local/bin/git' 
Running command /usr/local/bin/git clone -q ssh://[email protected]:loumarvincaraig/<project_name>.git /var/folders/3r/v7swlvdn2p7_wyh9wj90td2m0000gn/T/pip-91JVFi-build 
Complete output from command /usr/local/bin/git clone -q ssh://[email protected]:loumarvincaraig/<project_name>.git /var/folders/3r/v7swlvdn2p7_wyh9wj90td2m0000gn/T/pip-91JVFi-build: 

Cleaning up... 

Command /usr/local/bin/git clone -q ssh://[email protected]:loumarvincaraig/<project_name>.git /var/folders/3r/v7swlvdn2p7_wyh9wj90td2m0000gn/T/pip-91JVFi-build failed with error code 128 in None 

Exception information: 
Traceback (most recent call last): 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main 
status = self.run(options, args) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/commands/install.py", line 236, in run 
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/req.py", line 1092, in prepare_files 
self.unpack_url(url, location, self.is_download) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/req.py", line 1231, in unpack_url 
return unpack_vcs_link(link, loc, only_download) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/download.py", line 410, in unpack_vcs_link 
vcs_backend.unpack(location) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/vcs/__init__.py", line 240, in unpack 
self.obtain(location) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/vcs/git.py", line 111, in obtain 
call_subprocess([self.cmd, 'clone', '-q', url, dest]) 
File "/Users/se7entyse7en/Envs/test/lib/python2.7/site-packages/pip/util.py", line 670, in call_subprocess 
% (command_desc, proc.returncode, cwd)) 
InstallationError: Command /usr/local/bin/git clone -q ssh://[email protected]:loumarvincaraig/<project_name>.git /var/folders/3r/v7swlvdn2p7_wyh9wj90td2m0000gn/T/pip-91JVFi-build failed with error code 128 in None 
+0

Oczywiste pytanie, ale czy twój SSH działa na rzecz git push? Czy próbowałeś na gitlab.com, gdzie wszyscy możemy się rozmnażać? –

+0

yeah ssh działa dla git push. Zaktualizowałem odpowiedź. – se7entyse7en

Odpowiedz

28

Nie wiem dlaczego, ale uruchamiając następującą komendę to działało (slash zamiast: po <my_domain>):

pip install git+ssh://[email protected]<my_domain>/se7entyse7en/<project_name>.git 
#         ^
#        slash instead of : 
+0

Ktoś, kto zna przyczynę? – guemues