git push 遇见的两个错误

文章目录

    • more than 10000 commits, and skip-validation not set
    • prohibited by Gerrit: update for creating new commit object not permitted

more than 10000 commits, and skip-validation not set

$ git push origin roc-3.5.x
Counting objects: 236369, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (37588/37588), done.
Writing objects: 100% (236369/236369), 56.07 MiB | 3.05 MiB/s, done.
Total 236369 (delta 198538), reused 234966 (delta 198230)
remote: Resolving deltas: 100% (198538/198538)
remote: Counting objects: 283723, done
remote: Processing changes: refs: 1, done    
To ssh://*.*.*.*:20018/ROCm/ROCK-Kernel-Driver
 ! [remote rejected]           roc-3.5.x -> roc-3.5.x (more than 10000 commits, and skip-validation not set)
error: failed to push some refs to 'ssh://guolei@*.*.*.*:20018/ROCm/ROCK-Kernel-Driver'
$ git push -o skip-validation origin roc-3.5.x 
Counting objects: 236369, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (37588/37588), done.
Writing objects: 100% (236369/236369), 56.07 MiB | 2.47 MiB/s, done.
Total 236369 (delta 198537), reused 234966 (delta 198230)
remote: Resolving deltas: 100% (198537/198537)
remote: Counting objects: 283723, done
remote: Processing changes: refs: 1, done    
To ssh://10.*.*.*:20018/ROCm/ROCK-Kernel-Driver

prohibited by Gerrit: update for creating new commit object not permitted

$ git push origin --tags 
Counting objects: 153091, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (21406/21406), done.
Writing objects: 100% (153091/153091), 31.44 MiB | 2.21 MiB/s, done.
Total 153091 (delta 134196), reused 150407 (delta 131598)
remote: Resolving deltas: 100% (134196/134196)
remote: Counting objects: 210227, done
remote: Processing changes: refs: 13, done    
remote: error: internal error while processing changes
To ssh://10.*.*.*:20018/ROCm/ROCK-Kernel-Driver
 ! [remote rejected]           hipclang-3.2.0 -> hipclang-3.2.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.0.0 -> roc-1.0.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.1.0 -> roc-1.1.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.1.1 -> roc-1.1.1 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.2.0 -> roc-1.2.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.3.0 -> roc-1.3.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.3.1 -> roc-1.3.1 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.5.0 -> roc-1.5.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.5.1 -> roc-1.5.1 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.6.0 -> roc-1.6.0 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.6.1 -> roc-1.6.1 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.6.2 -> roc-1.6.2 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.6.3 -> roc-1.6.3 (prohibited by Gerrit: update for creating new commit object not permitted)
 ! [remote rejected]           roc-1.7.0 -> roc-1.7.0 (internal error)
 ! [remote rejected]           roc-1.7.1 -> roc-1.7.1 (internal error)
 ! [remote rejected]           roc-1.7.2 -> roc-1.7.2 (internal error)
 ! [remote rejected]           roc-1.8.0 -> roc-1.8.0 (internal error)
 ! [remote rejected]           roc-1.8.1 -> roc-1.8.1 (internal error)
 ! [remote rejected]           roc-1.8.2 -> roc-1.8.2 (internal error)
 ! [remote rejected]           roc-1.8.3 -> roc-1.8.3 (internal error)
 ! [remote rejected]           roc-1.9.0 -> roc-1.9.0 (internal error)
 ! [remote rejected]           roc-1.9.1 -> roc-1.9.1 (internal error)
 ! [remote rejected]           roc-1.9.2 -> roc-1.9.2 (internal error)
 ! [remote rejected]           roc-2.0.0 -> roc-2.0.0 (internal error)
 ! [remote rejected]           roc-2.1.0 -> roc-2.1.0 (internal error)
 ! [remote rejected]           roc-2.10.0 -> roc-2.10.0 (internal error)
 ! [remote rejected]           roc-2.2.0 -> roc-2.2.0 (internal error)
 ! [remote rejected]           roc-2.3.0 -> roc-2.3.0 (internal error)
 ! [remote rejected]           roc-2.4.0 -> roc-2.4.0 (internal error)
 ! [remote rejected]           roc-2.5.0 -> roc-2.5.0 (internal error)
 ! [remote rejected]           roc-2.6.0 -> roc-2.6.0 (internal error)
 ! [remote rejected]           roc-2.7.0 -> roc-2.7.0 (internal error)
 ! [remote rejected]           roc-2.8.0 -> roc-2.8.0 (internal error)
 ! [remote rejected]           roc-2.9.0 -> roc-2.9.0 (internal error)
 ! [remote rejected]           roc-3.0.0 -> roc-3.0.0 (internal error)
 ! [remote rejected]           roc-3.1.0 -> roc-3.1.0 (internal error)
 ! [remote rejected]           roc-3.3.0 -> roc-3.3.0 (internal error)
 ! [remote rejected]           rocm-3.5.0 -> rocm-3.5.0 (internal error)
error: failed to push some refs to 'ssh://guolei@10.*.*.*:20018/ROCm/ROCK-Kernel-Driver'

https://gerrit-review.googlesource.com/Documentation/error-prohibited-by-gerrit.html
参考这个页面把能加的权限都加进去了,但依旧还是提示这个错误。
偶然间灵光一闪,进行了下面这个尝试。

$ scp -p -P 29418 [email protected]:hooks/commit-msg .git/hooks/
commit-msg                                                           100% 1392    22.5KB/s   00:00    
$ git push origin tag roc-3.3.0
Counting objects: 1, done.
Writing objects: 100% (1/1), 173 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 1 (delta 0)
remote: Processing changes: refs: 1, done    
To ssh://10.*.*.*:20018/ROCm/ROCK-Kernel-Driver
 * [new tag]                   roc-3.3.0 -> roc-3.3.0

啊哈,搞定了。

你可能感兴趣的:(git)