我研究了一周怎么都没办法用Git Bash上传到远程库?

 蔡俊纬雅雯 发布于 2022-10-25 03:15

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上传到远程库?

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

    2022-11-12 01:39 回答
  • 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 配置

    2022-11-12 01:39 回答
  • 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的权限不够?

    2022-11-12 01:39 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有