git - 适用于 Windows 的 GitHub 桌面客户端能否与非 GitHub ssh 访问远程设备一起使用?

标签 git github github-for-windows

我在 GitHub 上有一个存储库,我已将其克隆到我的 Windows 7 笔记本电脑和我的 OS X 台式机上。我将这三个存储库称为 REPOlaptopdesktop

现在,在 laptop 存储库中,我使用 git remote add 添加了一个名为 desktop-remote 的 Remote ,如下所示:

% git remote add desktop-repo ssh://yourstruly@my_desktop_box/~/path/to/repo

这让我可以在我的笔记本电脑上使用 git-bash 推送和 pull desktop 存储库;例如:

% git push destkop-repo some-branch

等(事实上​​ ,我已经配置了我的 ~/.ssh 这样我就可以执行这些操作而不必为 yourstruly@my_desktop_box 输入我的 ssh 密码。一切都很好.)

好的,现在将在我的笔记本电脑上运行的 GitHub 桌面客户端 (Windows) 添加到此设置中。

就同步 laptop 存储库和 REPO 存储库(在 GitHub 上)而言,此客户端也很好用,但我无法让它识别other 我为laptop定义的 Remote ,即desktop-remote

有什么方法可以配置桌面客户端以使用“ssh-accessed”非 GitHub 远程(例如 desktop-remote)?或者,如果不需要特殊配置即可进行这项工作,我该如何解决为 laptop 存储库定义的 Remote 中缺少 desktop-remote 存储库的问题?

最佳答案

你不能这样做 - GitHub Desktop 只使用一个远程。

来自 GitHub 桌面文档的 Frequently Asked Questions :

Can I work with multiple remotes?

GitHub Desktop only supports adding Git remotes for the upstream repository. To work with other remotes, use Git on the command line. For more information, see "Adding a remote" in the GitHub Help.

关于git - 适用于 Windows 的 GitHub 桌面客户端能否与非 GitHub ssh 访问远程设备一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22118327/

相关文章:

GitHub:权限被拒绝(公钥)。 fatal: 远端意外挂断

git - git@github.com :. .. 和 https ://github. com/... 之间的区别?

github - 如何离线安装 Windows 版 Github?

github - 如何在 Github 中添加缺失的文件夹

github-for-windows - GitHub for Windows 显示旧的自述文件文本

git - 错误 merge 后恢复未提交的更改

git - Jenkins 构建最新提交,而不是 GitHub 提交后 Hook 指定的提交

git - 让 GitHub 和 Gerrit 玩得开心

git - 检查推送的标签是否在 git Remote 上

git - 有没有办法从 merge 提交中找到分支提交