简体   繁体   English

克隆使用ssh远程git仓库

[英]Clone a remote git repository using ssh

Hi I have a URL ssh://your login @ computer name / location. 嗨,我有一个URL ssh://您的登录名@计算机名/位置。

How do a clone this repository to D:\\MyRepo 如何将此存储库克隆到D:\\MyRepo

I'm not sure how to use it with ssh. 我不确定如何在ssh中使用它。

By command line, use either git clone user@server:/absolute/path/to/repo D:\\MyRepo or git clone user@server:relative/to/homedir/repo D:\\MyRepo . 通过命令行,使用git clone user@server:/absolute/path/to/repo D:\\MyRepogit clone user@server:relative/to/homedir/repo D:\\MyRepo

If you use a graphical tools like tortoiseSVN or something, the remote url you have to type in the appropriate field is something like user@server:relative/to/homedir/repo . 如果使用的是图形化工具,例如TortoiseSVN或东西,你必须在适当的字段中键入远程URL是一样的东西user@server:relative/to/homedir/repo

If git is in your_login account $PATH on the server ' computername ': 如果git在服务器“ computername ”上的your_login帐户$PATH

git clone ssh://your_login@computer_name/location/of/git/repo git clone ssh://您的登录名@计算机名/位置/ of / git / repo

If you haven't added your public key to ~/your_login/.ssh/authorized_keys , ssh will ask for your account password. 如果您尚未将公钥添加到~/your_login/.ssh/authorized_keys ,则ssh会要求您提供帐户密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM