您尚未登录。

楼主 #1 2018-11-28 09:26:04

pqfeng
会员
注册时间: 2018-08-18
已发帖子: 129
积分: 129

为什么我的Git命令一运行,就挂掉?

pqfeng@ubuntu:~/kernel413$ git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y
Cloning into 'linux'...
fatal: bad config file line 1 in /home/pqfeng/kernel413/linux/.git/config

我确定kernel413是一个空目录。

离线

#2 2018-11-28 09:34:22

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,237
积分: 9197

Re: 为什么我的Git命令一运行,就挂掉?

https://stackoverflow.com/questions/27073427/github-error-fatal-bad-config-file-line-1-in-git-config-when-in-git-shell/42870473

down vote
I solved this by

open .git/config file
clear all the NULL values in the file
save and close the file
git add .

还有其他几个答案也试一试.





离线

#3 2018-11-28 09:35:19

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,237
积分: 9197

Re: 为什么我的Git命令一运行,就挂掉?

https://blog.csdn.net/cijiancao/article/details/80819975

git使用问题:fatal: bad config line 1 in file C:/Users/Administrator/.gitconfig


在用git bash操作本地仓库的时候遇到如下问题

fatal: bad config line 1 in file C:/Users/Administrator/.gitconfig
看提示的意思:是git配置文件出了问题,找到提示的目录,把该文件下 .gitconfig文件删除

例如我的是:C:/Users/Administrator/.gitconfig

然后进行如下操作

1.打开git bash

2.执行如下配置命令

    git config --global user.name "your name"

    git config --global user.email "your email"

然后刚才删除的.gitconfig又重新生成了,git也可以正常使用了。





离线

楼主 #4 2018-11-28 19:39:34

pqfeng
会员
注册时间: 2018-08-18
已发帖子: 129
积分: 129

Re: 为什么我的Git命令一运行,就挂掉?

我在服务器上不行。 直接转到虚拟机上解决的。没去纠结这个问题。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn