linux问题解决

解决Not a git repository (or any of the parent directories)问题

将本地SSH添加到远程github 中
然后关联远程或push 又出现了错误,如下
fatal: Not a git repository (or any of the parent directories): .git
提示说没有.git这样一个目录
在命令行 输入 git init 然后回车就好了
再重新执行添加文件的命令即可。

echo core > /proc/sys/kernel/core_pattern权限不够

改成 sudo bash -c ‘echo core > /proc/sys/kernel/core_pattern’ 解决

RPC failed解决

原因1:缓存区溢出
解决方法:命令行输入
git config http.postBuffer 524288000
httpBuffer加大

git config --global http.postBuffer 524288000
git config --list
压缩配置

git config --global core.compression -1
修改配置文件

export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

原因2:网络下载速度缓慢
解决方法:命令行输入
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

原因3:首先浅层clone,然后更新远程库到本地
git clone http://github.com/target.git --depth 1 # target.git 为目标地址
cd target #先进入库路径下
git fetch --unshallow # 获取完整库

原因4:git忽略ssl证书
git config http.sslVerify “false”

发布了11 篇原创文章 · 获赞 0 · 访问量 343

猜你喜欢

转载自blog.csdn.net/qq_37316433/article/details/104461853