problem-Gerrit/Git error:"error: Trying to write ref HEAD with nonexistant ..."
?
? ? ?XXXXXXXX :~/public$ git clone ssh://git.YYYYY.com/YYYYY.git
Initialized empty Git repository in /home/YYYYY/public/YYYYY/.git/remote: Counting objects: 266355, doneremote: Finding sources: 100% (266355/266355)remote: Total 266355 (delta 67252), reused 266353 (delta 67252)Receiving objects: 100% (266355/266355), 2.26 GiB | 3.32 MiB/s, done.Resolving deltas: 100% (67252/67252), done.error: Trying to write ref HEAD with nonexistant object 77b0820f218fb9028e40344910b0c824d4e9e979fatal: Cannot update the ref 'HEAD'.?
======================logs??end=============================
sovle:
reference --->?git clone (ssh://) skips detached HEAD
原因:1、初步判断HEAD 指向的object 有问题,指向object或被损坏或不存在
? ? ? ? ? ? ? ? ? ? ? 2、在git/gerrit 服务端查看该库的HEAD内容:ref: refs/meta/config ? ?这个是gerrit 服务配置,参考其他运行的git库,正确应该 ? ?ref: refs/heads/master ? 。修改好了,就可以正常git clone
? ? ? ? ? ? ? ? ? ? ? ?3、初步结论,应该是在创建版本库的时候,操作有错误步骤和方法。
======================?end ?ok ?=============================
?