gerrit/git操作中遇到的问题
·
问题1:lack ‘forge committer’ permission.
remote: ERROR: commit 639e7ed: email address linux@163.com is not registered in your account, and you lack ‘forge committer’ permission.
$ git push origin dev:zigbee_dev
Enumerating objects: 93, done.
Counting objects: 100% (93/93), done.
Delta compression using up to 6 threads
Compressing objects: 100% (90/90), done.
Writing objects: 100% (92/92), 427.40 KiB | 4.59 MiB/s, done.
Total 92 (delta 8), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (8/8)
remote: Processing changes: refs: 1, done
remote: ERROR: commit 639e7ed: email address oplinux@163.com is not registered in your account, and you lack 'forge committer' permission.
remote: You have not registered any email addresses.
remote: To register an email address, visit:
remote: http://192.168.3.3:8081/settings#EmailAddresses
remote:
remote:
To ssh://192.168.3.3:29418/zigbee_soc_module.git
! [remote rejected] dev -> zigbee_dev (commit 639e7ed: invalid committer)
error: failed to push some refs to 'ssh://192.168.3.3:29418/zigbee_soc_module.git'
$
解决1:将用户所在分组dev
加入到refs/heads/*
的Forge Committer Identity
中
问题2:remote: To push into this reference you need ‘Push’ rights.
$ git push origin dev:zigbee_dev
Enumerating objects: 93, done.
Counting objects: 100% (93/93), done.
Delta compression using up to 6 threads
Compressing objects: 100% (90/90), done.
Writing objects: 100% (92/92), 427.40 KiB | 4.80 MiB/s, done.
Total 92 (delta 8), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (8/8)
remote: error: branch refs/heads/zigbee_dev:
remote: To push into this reference you need 'Push' rights.
remote: User: snow
remote: Contact an administrator to fix the permissions
remote: Processing changes: refs: 1, done
To ssh://192.168.3.3:29418/zigbee_soc_module.git
! [remote rejected] dev -> zigbee_dev (prohibited by Gerrit: not permitted: update)
error: failed to push some refs to 'ssh://192.168.3.3:29418/zigbee_soc_module.git'
解决2:将用户所在分组dev
加入到refs/heads/*
的Push
中
问题3:hint: Updates were rejected because a pushed branch tip is behind its remote
$ git push -u origin dev:zigbee_dev
To ssh://192.168.3.3:29418/zigbee_soc_module.git
! [rejected] dev -> zigbee_dev (non-fast-forward)
error: failed to push some refs to 'ssh://192.168.3.3:29418/zigbee_soc_module.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
解决3:新仓库在push之前,需要先执行git pull操作
问题4:fatal: refusing to merge unrelated histories
$ git pull
fatal: refusing to merge unrelated histories
解决4:pull添加--allow-unrelated-histories
参数
$ git pull --allow-unrelated-histories
Already up to date!
Merge made by the 'recursive' strategy.
问题5:git add时,文件过长报错Filename too long
admin@DESKTOP-DAU6V5J MINGW64 /d/Silicon/developer/sdks/gecko_sdk_suite/v2.7/app/build/Zigbee-Smart-Gate (zigbee_dev)
$ git add .
error: open(".pdm/com.silabs.module.additional.pdm.com.silabs.ss.framework.project.toolchain.core.default#com.silabs.ss.tool.ide.arm.toolchain.gnu.cdt.7.2.1.20170904 - EFR32MG21A020F1024IM32.slsproj"): Filename too long
error: unable to index file '.pdm/com.silabs.module.additional.pdm.com.silabs.ss.framework.project.toolchain.core.default#com.silabs.ss.tool.ide.arm.toolchain.gnu.cdt.7.2.1.20170904 - EFR32MG21A020F1024IM32.slsproj'
fatal: adding files failed
admin@DESKTOP-DAU6V5J
解决5:git config --global core.longpaths true
- git能够创建长度为4096的文件名,但在windows中下使用git时,由于git用了旧版本的windows api,默认文件名最长为260。
admin@DESKTOP-DAU6V5J MINGW64 /d/Silicon/developer/sdks/gecko_sdk_suite/v2.7/app/build/Zigbee-Smart-Gate (zigbee_dev)
$ git config --global core.longpaths true
admin@DESKTOP-DAU6V5J MINGW64 /d/Silicon/developer/sdks/gecko_sdk_suite/v2.7/app/build/Zigbee-Smart-Gate (zigbee_dev)
$ git add .
admin@DESKTOP-DAU6V5J MINGW64 /d/Silicon/developer/sdks/gecko_sdk_suite/v2.7/app/build/Zigbee-Smart-Gate (zigbee_dev)
$ git status
On branch zigbee_dev
Your branch is up to date with 'origin/zigbee_soc_gate'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: .gitignore
new file: .pdm/com.silabs.module.additional.pdm.com.silabs.ss.framework.project.toolchain.core.default#com.silabs.ss.tool.ide.arm.toolchain.gnu.cdt.7.2.1.20170904 - EFR32MG21A020F1024IM32.slsproj
new file: .pdm/com.silabs.module.additional.pdm.com.silabs.ss.framework.project.toolchain.core.default#com.silabs.ss.tool.ide.arm.toolchain.gnu.cdt.7.2.1.20170904 - EFR32MG21A020F768IM32.slsproj
new file: .pdm/com.silabs.module.additional.pdm.com.silabs.ss.framework.project.toolchain.core.default#com.silabs.ss.tool.ide.arm.toolchain.gnu.cdt.7.2.1.20170904.slsproj
new file: .settings/com.silabs.ss.framework.ide.project.sls.core.prefs
admin@DESKTOP-DAU6V5J MINGW64 /d/Silicon/developer/sdks/gecko_sdk_suite/v2.7/app/build/Zigbee-Smart-Gate (zigbee_dev)
$
更多推荐
已为社区贡献3条内容
所有评论(0)