Error of Git

    本文旨在记录使用git时遇到的各种问题及解决方案,希望更多的人少走弯路。

1、eclipse 上传更新的时候出现:cannot open git-receive-pack


方案1:
可以试试下面的配置
windows-->Preferences-->Team-->Git-->Configuration-->User Settings.然后点Add Entry新建一个键值对,输入http.sslVerify=false
方案2:
重新Commit【虽然并没有增加什么】,再push。

2、cannot open git-upload-pack

首次share代码到github时:
share时配置文件未全部commit,  cannot open git-upload-pack。
试了1的方法,失败;最后断开连接,删除本地仓库后重新share all,成功。
非首次: 断开连接,删除本地仓库,pull到本地,再次commit【如果直接commit此时提交的会覆盖先前提交的】。

3、pull时异常:The current branch is not configured for pull No value for key remote.origin.url found in configuration

解决方案1:
找到当前工程的config文件,E:\WorkSpace\Algorithm\.git\config;
修改内容如下:
[core]
    symlinks = false
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[branch "master"] 
    remote = origin
    merge = refs/heads/master
[remote "origin"] 
    fetch = +refs/heads/*:refs/remotes/origin/*
解决方案2:
Window->Preference->Team->Git->Configuration->Repository Settings->选择当前repository,open,按方案1的内容修改。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值