【发布时间】:2018-12-09 23:15:18
【问题描述】:
我一直在阅读其他 Git 存储库未发现错误,但仍在努力解决我遇到的问题。
我正在处理一个本地存储库,将其推送到 Forge 监视的 Remote,并在更新主分支时部署到生产环境。它没有部署我正在推动的更改!我做出了 4 项在网站上尚未实现的贡献。我还尝试通过立即部署按钮从 Forge 中手动部署代码,但这也不起作用。我得到的错误附在下面。
Fri Jun 29 08:30:42 UTC 2018
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我是 GitHub 项目的贡献者。我已经将我的 SSH 密钥添加到我的 github 帐户以及 Forge 管理区域,这样我就可以 ssh 进入 Forge 服务器。
当我在 Forge 服务器上运行 ssh -T git@github.com 时,我得到了另一个不再从事该项目的工程师的名字。所以,我认为问题出在 Forge 服务器上,因为它没有我的密钥。所以我尝试了:
ssh-copy-id forge@[ip address] I get the following:
INFO: attempting to log in with the new key(s), to filter out any that
are already installed
/usr/bin/ssh-copy-id: WARNING: All keys were skipped because they
already exist on the remote system.
(if you think this is a mistake, you may want to use -f option)
我应该强迫它吗?
这是我的 .ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
[编辑] 所以运行 ssh -vvv git@github.com 给出:
debug1: Authenticating to github.com:22 as 'git'
debug3: hostkeys_foreach: reading file "/home/forge/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file
/home/forge/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from github.com
【问题讨论】:
-
如果你的 Git 是为其他用户设置的,那么是的,你绝对应该修复它。
-
用-f来强制干什么?