SSL certificate problem
fatal: unable to access "https://github.com/xxx/": SSL certificate problem: unable to get local issuer certificate
是因为开了代理,配置下即可解决。
git config --global --unset http.proxy
git config --global --unset https.proxy
或者直接不验证 ssl 证书(危)
git config --global http.sslVerify false
detected dubious ownership in repository at…
D:\Develop\Chaospace\public>git push -u origin main
fatal: detected dubious ownership in repository at 'D:/Develop/Chaospace/public'
'D:/Develop/Chaospace/public' is owned by:
but the current user is:
xxxx/xxxx (x-x-xx-xx-xxxxx-xxxxx-xxxxx-xxxxx)
To add an exception for this directory, call:
git config --global --add safe.directory D:/Develop/Chaospace/public
是因为当前操作用户和目录所有者不同。
takeown 即可解决。但是注意,此操作会变更 D 盘下所有文件的归属者,如果文件过多将会异常耗时。
# 获取文件所有权
takeown /F D:\ /R /D Y
# /F D:\ 指定路径
# /R 递归
# /D Y 遇到询问时自动回答 'Y'