【问题标题】:Eclipse git: how to push your code to remote git repository in a debian VPSEclipse git:如何在 debian VPS 中将代码推送到远程 git 存储库
【发布时间】:2018-09-06 00:23:12
【问题描述】:

我有一个包含 git 存储库的 debian VPS。

从 git 存储库中,我成功地在 eclpise 中创建了一个新项目。

克隆地址:git://myWebsite.com/myRepository.git

所以我开始在本地机器上编码,然后我想提交更改并将更改推送到 VPS 中的存储库,但它不起作用:git://myWebsite.com/myRepository.git 访问被拒绝。

这是我的预期,因为逻辑上你必须在某个地方对你的 VPS 进行身份验证。

我可以通过 SSH 访问我的 VPS(使用 RSA 密钥和简单的登录验证)。问题是:我必须如何以及在哪里配置身份验证?

假用户名:pippo

假密码:oppip

【问题讨论】:

  • 那么您的帐户拥有此 Repo 的权限吗?您至少在本地 git 上设置了您的邮件地址并输入/启用了 RSA 密钥以进行身份​​验证?
  • @LenglBoy 不,我没有执行任何身份验证。如果您阅读了我的问题,我在问如何进行身份验证。

标签: eclipse git debian vps


【解决方案1】:

git:// 协议用于克隆但不用于推送。您需要将 URL 更改为 ssh:// URL:

git remote set-url origin ssh://pippo@myWebsite.com/path/to/myRepository.git

git remote set-url origin pippo@myWebsite.com:relative/path/myRepository.git

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-06-24
    • 2010-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-08
    相关资源
    最近更新 更多