git 报错集合

  1. key does not contain a section: global
    设置邮箱时,git config -- global user.email "caohan@agree.com.cn",命令--和global之间不能有空格。

2.detected dubious ownership in repository at '/Users/caohan/workSpace/webide/webide'
To add an exception for this directory, call:
跑下面命令即可:git config --global --add safe.directory "*";

3.cannot open '.git/FETCH_HEAD': Permission denied
原因在于mac .git文件夹下的FETCH_HEAD文件权限不足。

sudo chown -R caohan:staff .git
//caohan 是当前用户
//staff 是用户所属组

不知道当前用户组输入查询

groups // 查看当前用户所属组
groups user_name // 查看指定用户所属组
 
Note:用户所属组可能有多个
 
id -a user_name // 可以查到指定用户所属组更详细的信息
 
查看当前用户的用户名:whoami

4.curl 18 transfer closed with outstanding read data remaining
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
拉取项目时间过长报错。

1.加大缓存区 git config --global http.postBuffer 524288000 这个大约是500M
2.如果第一种方式不行,可以尝试浅复制,

git clone https://git.aweb.org.cn/webide-open/demo/largeScreen.git --depth 1

5.SSL certificate problem: certificate has expired:
SSL证书问题:证书已过期
解决方案:输入命令,关闭git的安全校验。git config --global http.sslVerify false

posted @ 2023-04-04 11:32  皮皮买  阅读(256)  评论(0编辑  收藏  举报