大佬教程收集整理的这篇文章主要介绍了如何在 Media Temple Centos 上通过 ssh 连接到 git remote?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在 Centos 7 上创建了一个新用户,在authorized_keys 中添加了一个带有我的公钥的 .ssh 文件夹。我能够通过 ssh 与该用户成功连接到服务器
ssh <username>@<i@R_944_9686@ess>
我还在服务器上创建了一个裸 git 存储库:
/var/repo/<reponame>.git
并使用以下方法在我的本地机器上添加了一个遥控器:
git remote add origin <username>@<i@R_944_9686@ess>:/var/repo/<reponame>.git
当我跑步时:
git remote show origin
或
git push origin master
它挂起,然后给出响应:
ssh: connect to host <i@R_944_9686@ess> port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我不知道为什么我可以通过 SSH 成功连接,但是这个命令失败了。您能提供的任何帮助都绝对令人赞叹。
首先检查您成功的 ssh 连接是否带有来自远程用户 ~/.profile
或 ~/.bashrc
的输出。
理想情况下,它应该是静音的。
当您打开交互式 SSH 会话时,还要检查 git
是否可用(在默认系统路径中)。
以上是大佬教程为你收集整理的如何在 Media Temple Centos 上通过 ssh 连接到 git remote?全部内容,希望文章能够帮你解决如何在 Media Temple Centos 上通过 ssh 连接到 git remote?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。