github:Failed to publish this branch

本文介绍了解决Windows系统中Git同步时遇到Failed to publish this branch错误的方法,该错误由libcurl库被其他软件覆盖引起。提供更新libcurl或更改连接方式为SSH的解决方案。

(windows系统)同步git时遇到“Failed to publish this branch”的错误,shell输入命令得到详细提示“https not supported or disabled in libcurl”

仔细检查之后发现是由于安装了别的软件,或者是编程中因需要而更换过库文件,导致system32里面的libcurl被覆盖了。

解决的办法一是可以选择更新libcurl,或者把默认git的默认连接方式由https改为ssh,只需在shell执行以下命令即可:

git config --global url.ssh://git@github.com/.insteadOf https://github.com/

ts-xin.e.yu@CN-FVFC402GL416 migration-mirror % cd opp-commons-ems.git ts-xin.e.yu@CN-FVFC402GL416 opp-commons-ems.git % git fetch --all remote: Enumerating objects: 35, done. remote: Counting objects: 100% (35/35), done. remote: Compressing objects: 100% (17/17), done. remote: Total 31 (delta 14), reused 24 (delta 8), pack-reused 0 (from 0) Unpacking objects: 100% (31/31), 4.30 KiB | 115.00 KiB/s, done. From github.com:PointPlatform/opp-commons-ems * [new branch] feature/ONEPOINT-publish-jar -> feature/ONEPOINT-publish-jar d5b50e6..dbb745a master -> master * [new ref] refs/pull/1/head -> refs/pull/1/head * [new ref] refs/pull/1/merge -> refs/pull/1/merge ts-xin.e.yu@CN-FVFC402GL416 opp-commons-ems.git % git push --mirror git@github.com:PointPlatform/opp-commons-ems.git Enumerating objects: 4, done. Counting objects: 100% (4/4), done. Delta compression using up to 8 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 993 bytes | 993.00 KiB/s, done. Total 2 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), completed with 1 local object. remote: remote: Create a pull request for 'feature/add-AGG-destination-for-Grant' on GitHub by visiting: remote: https://github.com/PointPlatform/opp-commons-ems/pull/new/feature/add-AGG-destination-for-Grant remote: To github.com:PointPlatform/opp-commons-ems.git * [new branch] feature/add-AGG-destination-for-Grant -> feature/add-AGG-destination-for-Grant ! [remote rejected] refs/pull/1/head -> refs/pull/1/head (deny updating a hidden ref) ! [remote rejected] refs/pull/1/merge -> refs/pull/1/merge (deny updating a hidden ref) error: failed to push some refs to 'github.com:PointPlatform/opp-commons-ems.git' 如何解决
08-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值