fatal: destination path ‘文件夹名’ git clone already exists and is not an empty directory
解决:如果这是克隆项目时报的错误,那么请检查工作目录是否为空,如果不是,删除目录中的文件即可
fatal: remote origin already exists.
解决:
- git remote rm origin
- git remote add origin git@xxx.xxx.xxx.xxx:/git/xxx.git // 参见:dengjianqiang2011的专栏
remote: fatal: Unable to create temporary file '/git/xxxx.git/./objects/pack/tmp
_pack_XXXXXX': Permission denied
fatal: sha1 file '' write error: Broken pipe
error: failed to push some refs to 'git@121.40.77.13:/git/xxxx.git'
解决:检查服务端git项目的权限(chown -R git:git /git)
注意:在初始化裸仓库时,切记不要用root权限,可以:sudo -u git git init --bare /git/test.git
Initialized empty Git repository in /root/web/.git/
/root/.ssh/config: line 1: Bad configuration option: ServerAlivelnterval
/root/.ssh/config: terminating, 1 bad configuration options
fatal: The remote end hung up unexpectedly
解决:错误的配置项,找到/root/.ssh/config,删除错误行,或者直接删除文件
You asked me to pull without telling me which branch youwant to merge with, and 'branch.master.merge'
inyour configuration file does not tell me, either. Pleasespecify which branch you want to use on the
command line andtry again (e.g. 'git pull').See git-pull(1) for details.If you often merge with the same branch,
you may want touse something like the following in your configuration file: [branch "master"] remote
=merge =[remote ""] url =fetch =See git-config(1) for details.
解决:这其实不是错误,因为没有pull前设置跟踪分支,设置:git branch --set-upstream branchA origin/branchB
fatal: unable to access 'https://github.com/laradock/laradock.git/': error setting certificate verify locations:
解决
方法1:git config --global http.sslverify "false" // 不推荐
方法2:git config --system http.sslcainfo "C:\Program Files\path\to \git\bin\ca-bundle.crt" --replace-all*** // 在git的安装位置找到ca-bundle.crt,然后更新ssl证书