【发布时间】:2018-12-17 08:28:04
【问题描述】:
我正在尝试设置一个 git 存储库,以便经常从我的本地 git 存储库更新到我在 google 计算引擎上的服务器。
目前我可以使用 Windows 中的 putty 连接到谷歌计算引擎 vm。
这是我遵循的程序。
- 在我的本地 Windows 开发机器上创建了一个 git 存储库。
- 在远程虚拟机上创建了一个裸仓库。
- 在远程 vm 服务器上创建了一个用户 git。
- 将用于putty的ssh密钥复制到git用户
.ssh/authorized_keys -
将 git 远程添加到我的本地 git 存储库
git remote add origin https://my_serv_ip/path_to_git_repository
但是当我尝试 git push 时,我得到了错误 致命:未找到存储库“https://my_serv_ip/path_to_git_repository”
任何建议如何解决这个问题?
【问题讨论】:
-
"在远程虚拟机上创建了一个裸存储库。你有没有安装 git 服务器?如果没有,你也需要 gitosis
-
@CodeWizard 我已经安装了 git。我需要安装一些 git 服务器吗?
-
当然,除非您使用的是文件协议...
-
如果你想用ssh访问,你不需要安装一个git服务器。
标签: git ssh google-cloud-platform repository google-compute-engine