【问题标题】:Git pull and push is not workedGit拉和推不起作用
【发布时间】:2020-10-18 09:09:03
【问题描述】:

我不明白为什么这个命令不起作用。请问有人遇到过这种情况吗?

参数: Apache/2.4.29 (Ubuntu) php.7.4.7 git 版本 2.17.1

git status, git checkout, git branch

有效,但 git pull origin master, git push origin master 无效。我在谷歌上找不到答案。

错误:

ssh:连接到主机 github.com 端口 22:连接超时 致命:无法从远程存储库读取。

编辑: 我找到了这个,但它对我不起作用:link 我收到超时错误:

ssh:连接到主机 ssh.github.com 端口 443:连接超时 致命:无法从远程存储库中读取。 请确保您拥有正确的访问权限 并且存储库存在。

请帮帮我

【问题讨论】:

  • 您能否发布更多详细信息,例如来自 git 的输出/错误消息。
  • @CQLI 感谢回复。也添加了错误消息
  • 另一种可能是您在项目下添加了 ssh 密钥,而不是在用户配置文件下。你能不能也检查一下。
  • @AbhilashPS 谢谢回答,它自己工作

标签: git ubuntu github apache2 ssh-keys


【解决方案1】:

首先我会检查

git remote show origin

确保网址正确。

如果 URL 正确,那么您可能没有编辑该存储库的权限。关注 these instructions 为你的 Github 账户添加 SSH 密钥。

【讨论】:

  • 我有一个遥控器。在问题出现之前我做了 git pull 和 git push
  • 运行ssh -T -p 443 git@ssh.github.com时会发生什么?
【解决方案2】:

我不明白发生了什么,但它是自行运行的。我在下面找到了一个有用的链接:

  1. gist.github.com
  2. askubuntu.com

【讨论】:

    猜你喜欢
    • 2013-08-21
    • 1970-01-01
    • 2015-03-23
    • 2020-03-27
    • 2019-04-10
    • 2022-09-29
    • 2013-02-09
    • 2011-11-06
    • 2018-02-28
    相关资源
    最近更新 更多