不同的git账号可以通过ssh key向同一个github账号传文件吗
習慣沉默
習慣沉默 2017-05-02 09:43:38
[Git讨论组]

我在github上已经设置好了ssh key:


但是通过ssh克隆github上的库时,出现报错:

我还缺少什么配置吗?

补充:

ssh -vvv -T git@github.com


补充:

文件是已生成的

習慣沉默
習慣沉默

全部回复(2)
習慣沉默

你缺少科学上网的配置?ssh -vvv -T git@github.com 看看。

git 没有账号的概念。

你这是不同的 ssh key,同一个 GitHub 账号。

所有 GitHub 用户都共享一个名叫 git 的 ssh 账号。

根据 ssh 调试信息,考虑防火墙(或者类似的网络限制)的问题。检查 Windows 防火墙设置、网络设置(你的网络是不是不允许访问 22 端口什么的?有没有透明代理?)、最后检查中国特色的部分。

PHP中文网

首先上图

➜ .ssh ssh -vvv -T git@github.com

OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "github.com" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to github.com [192.30.253.112] port 22.
debug1: Connection established.
debug1: identity file /home/mugbya/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mugbya/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to github.com:22 as 'git'

试了一下不太是ssh证书的问题,你继续排查吧

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号