Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ssh git clone

git clone git@github.com:<name>/<repo>.git
Comment

git clone through ssh

This is possibly unrelated directly to the question; but one mistake I just made myself, and I see in the OP, is the URL specification ssh://user@server:/GitRepos/myproject.git - namely, you have both a colon :, and a forward slash / after it signifying an absolute path.

I then found Git clone, ssh: Could not resolve hostname – git , development – Nicolas Kuttler (as that was the error I was getting, on git version 1.7.9.5), noting:

The problem with the command I used initially was that I tried to use an scp-like syntax.

... which was also my problem! So basically in git with ssh, you either use

ssh://username@host.xz/absolute/path/to/repo.git/ - just a forward slash for absolute path on server
username@host.xz:relative/path/to/repo.git/ - just a colon (it mustn't have the ssh:// for relative path on server (relative to home dir of username on server machine)
Hope this helps someone,
Cheers!
Comment

PREVIOUS NEXT
Code Example
Shell :: init step way to create repository git 
Shell :: github repository 
Shell :: png to jpg linux command line 
Shell :: diff between tail and head command 
Shell :: sed replace from match to end of line 
Shell :: git find commit by message 
Shell :: vscode command line run 
Shell :: install docker debian 10 
Shell :: gitlab push existing project commandlie 
Shell :: linux change directoryyy 
Shell :: create local git branch from remote 
Shell :: how install mongodb on raspberry 
Shell :: how to install pgadmin in ubuntu on cloud server 
Shell :: first commit github 
Shell :: Errors were encountered while processing: ubuntu 
Shell :: awk or statement 
Shell :: show saved network connections linux 
Shell :: install flathub in linux elementary 
Shell :: how to setup a command that install all npm modules, in subfolders 
Shell :: verify large directory after copy files 
Shell :: ./build/env/bin/hue shell < script.py 
Shell :: calcul en shell 
Php :: php detect request type 
Php :: php error 
Php :: php referer url 
Php :: smarty assign var 
Php :: laravel images mimetypes validatiion 
Php :: extensions for laravel command ubuntu 20.04 
Php :: where like laravel 
Php :: findorfail laravel 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =