[英]Git ERROR: Repository not found
我一直在阅读其他Git存储库,但未发现错误,但仍在努力解决我遇到的问题。
我正在开发本地仓库,将其推送到Forge监视的Remote,并在更新master分支时将其部署到生产中。 它没有部署我要推动的更改! 我做了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
[edit]因此,运行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
当我在Forge服务器上运行
ssh -T git@github.com
时,我得到了另一个不再从事该项目的工程师的名字。 因此,我认为问题出在Forge服务器上,因为它没有我的钥匙。
没错,但是有些不完整。 更具体地说,当您在Forge服务器上并运行ssh -T git@github.com
,Forge服务器为GitHub提供了一些密钥。 该密钥确实存在于Forge服务器和 GitHub上。 不管使用什么密钥,GitHub都会使用该密钥来找出您的身份,并且GitHub上存储的内容表明该密钥属于另一位工程师。
...
ssh-copy-id forge@[ip address]
想必你是从某台机器中有您的GitHub键运行此。 如果是这样,那是适当的。
[产生]
/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)
您确实可以使用-f
。
我自己以不同的方式完成所有这些操作:我有一个ssh密钥,仅用于GitHub访问,并配置了要从其中访问GitHub的系统:
$ cat $HOME/.ssh/config
[snip]
Host github.com
IdentityFile ~/.ssh/id.github
IdentitiesOnly yes
(其中id.github
包含私钥,而id.github.pub
包含公钥)。
我为每个组织使用不同的<public,private>密钥对,这可以生成复杂的.ssh/config
文件,但是这意味着我没有将所有内容都分发给所有人。
以下是我修复Forge通过SSH连接到GitHub的步骤:
ssh-keygen -t rsa -b 4096 -C“我的电子邮件”
评估“ $(ssh-agent -s)”
ssh-add〜/ .ssh / id_rsa
ssh -vT git@github.com
[不包括大量技术问题]嗨,[我的用户名]! 您已成功通过身份验证,但是GitHub不提供Shell访问。
cat〜/ .ssh / id_rsa.pub-通过转到“设置”>“ SSH和GPG密钥”>单击“新建SSH密钥”或“添加SSH密钥”,将其复制并添加到github帐户中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.