github要token提交代码后, 提交不了的解决方法

本文详细阐述了在GitHub不再支持密码提交后,遇到的'Can't connect to any repository'错误,并介绍了如何通过修改`.git/config`文件,移除无效配置并设置正确的SSH token,最终实现Eclipse中成功提交代码的方法。

github要token提交代码后(原来是密码提交), 老是提交报错:

Can't connect to any repository: https://github.com/automvc/helloxxx.git 
(https://github.com/automvc/helloxxx.git: cannot open git-receive-pack)

 或者:

Can't connect to any repository: https://github.com/automvc/helloxxx.git 
(https://github.com/automvc/helloxxx.git: authentication not supported)

2021年8月13日, github不再支持用密码提交代码, 要使用token.

网上找了好多资料都没有解决.

后来通过以下方式解决了.

旧的配置信息,多了:

    symlinks = false
    ignorecase = true

[http]
    sslVerify = false

这个 sslVerify 配置也不能有.

配置文件在  工程目录下\.git\config文件:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://github.com/automvc/helloxxx.git
    fetch = +refs/heads/master:refs/remotes/origin/master
[branch "master"]
    remote = origin
    merge = refs/heads/master

github要token提交代码后, 在Eclipse提交不了的解决方法

修改后,可在eclipse直接提交代码.

 

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值