Linux gitpush错误,linux – GIT:无法推送(奇怪的配置问题)

我正在全新安装

Linux Mint.

尝试从任何存储库推送时,我收到以下错误:

error: Malformed value for push.default: simple

error: Must be one of nothing,matching,tracking or current.

fatal: bad config file line 8 in /home/leng/.gitconfig

fatal: Could not read from remote repository.

这很奇怪,因为我肯定有一个支持简单推送行为的版本.

git –version的输出是git版本1.8.3.2.

〜/ .gitconfig的内容:

[user]

name = My Name

email = MyEmail@website.com

[color]

ui = true

[push]

default = simple

这是令人毛骨悚然的地方.

如果我将行为更改为匹配(或任何,跟踪或当前,为此),然后尝试推送,我得到相同的确切错误消息.怎么可能?是以某种方式缓存配置?我甚至试过重启.我甚至尝试从系统中彻底清除GIT(并删除〜/ .gitconfig)然后重新安装它.

如果我从.gitconfig文件中完全删除[push]部分(或者如果我完全删除文件),那么尝试推送,然后我得到:

Git 2.0 from 'matching' to 'simple'. To squelch this message

and maintain the current behavior after the default changes,use:

git config --global push.default matching

To squelch this message and adopt the new behavior now,use:

git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.

(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode

'current' instead of 'simple' if you sometimes use older versions of Git)

error: Malformed value for push.default: simple

error: Must be one of nothing,tracking or current.

fatal: bad config file line 8 in /home/leng/.gitconfig

fatal: Could not read from remote repository.

…所以它似乎都承认我没有选择推动行为,但后来也说我选择了一种不受支持的行为.到底是怎么回事?

如果我完全删除〜/ .gitconfig,我甚至会收到错误.

有谁可以帮我解决这个巫术?

谢谢!

编辑:

这是一个请求的.git / config文件:

[core]

repositoryformatversion = 0

filemode = true

bare = false

logallrefupdates = true

[remote "origin"]

url = ssh://{my remote repo}

fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]

remote = origin

merge = refs/heads/master

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值