我研究了一周怎么都没办法用Git Bash上传到远程库?
PHP中文网
PHP中文网 2017-05-02 09:18:44
[Git讨论组]

ssh:connect to host github.com port 22:Bad file number
fatel;cound not read from remote repository.
please make sure you have the correct access rights
and the repository exists ??
我研究了一周怎么都没办法用Git Bash上传到远程库?

PHP中文网
PHP中文网

认证0级讲师

全部回复(3)
阿神

github为例,我搜到了这篇:
https://help.github.com/articles/error-bad-file-number/
首先使用以下命令测试:ssh -vT git@github.com发现更多错误信息。

然后结合你现在看到的错误提示:

ssh:connect to host github.com port 22:Bad file number
fatel;cound not read from remote repository.
please make sure you have the correct access rights
and the repository exists 

大概是权限问题吧,
1. 尝试把公钥上传到github
2. 远程的repo的权限不够?

伊谢尔伦

GIT设置问题:
第一步:
设置

git config --global user.name "你在githbub上注册的名"

git config --global user.email "你在githbub上注册的电邮"

第二步: 授权,假设你用SSH来连接

第三步 创建库,这个在GITHUB上操作,不用累述

当你在本地

git commit

然后,就

git push 

你看到提示' git remote add <name> <url>'
然后,你再

git push

说多了,如果你看英文帮助,都在里面
git 配置

PHP中文网

你应该在.ssh目录添加一个config文件设置端口443

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

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