git - TortoiseGit:无法使用 SSH 在 VPS 上 Git 克隆私有存储库
问题描述
我正在尝试使用 TortoiseGit 克隆一个存储库。我只能通过 SSH 访问我在 VPS 上的 git 存储库。我收到以下错误:
git.exe clone --progress -v "ssh://git@xx.xx.xx.xx/home/git/git-repo/myproject.git" "C:\xampp\htdocs\myproject"
Cloning into 'C:\xampp\htdocs\myproject'...
/usr/bin/bash: git@xx.xx.xx.xx: No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但是,我可以在 Windows 上使用 Git Bash 克隆我的私有存储库。这很奇怪。使用 TortoiseGit 进行 SSH 时我做对了吗?
解决方案
如果您更喜欢使用 ssh 密钥进行克隆,则需要创建 ssh 密钥并将其添加到 git 存储库 ssh 公钥。使用 ssh-keygen 生成您的 ssh 密钥
推荐阅读
- function - return_of_invalid_type 返回类型“String”不是“void”,由方法“getData”定义
- python - 即使在更新数据库后,SQLAlchemy 也不会在我的表中找到该列?
- angular - 由于 Firebase 的 IDBIndex 错误,无法提供服务器呈现的应用程序
- java - 如何将 Swing 小部件插入 SWT 我在使用 SWT_AWT.new_Frame 时在线程“main”java.lang.IllegalArgumentException 中出现异常
- angular - Ngrx,Rxjs - 合并可观察的流返回一个新的流
- angular - 子节点出现在每个父节点中
- php - 如何为已在 phpunit 中初始化的 MockObject 实例设置动态属性
- angular - 在 Angular 后端的每个服务上出现 403 错误是在 laravel
- android - 所需类型与找到的不同
- node.js - 数据绑定到 node.js 中的 ejs 文件不起作用