Hi Matthias,I have Gerrit up and running. I used DEVELOPMENT_BECOME_ANY_ACCOUTfor lab usage only. I see Gerrit running "OK" on my Linux server from the bin/gerrit.sh script.My intention is to use Gerrit for code review of a large pull-request which Crucible is unable torender from Bitbucket. Is this process of pushing the pull-request to Gerrit documented somewhere ?
On Mar 22, 2021, at 11:26 AM, Matthias Sohn <matthi...@gmail.com> wrote:On Mon, Mar 22, 2021 at 11:16 AM rkohli2000 gmail <rkohl...@gmail.com> wrote:Hi Matthias,I have Gerrit up and running. I used DEVELOPMENT_BECOME_ANY_ACCOUTfor lab usage only. I see Gerrit running "OK" on my Linux server from the bin/gerrit.sh script.My intention is to use Gerrit for code review of a large pull-request which Crucible is unable torender from Bitbucket. Is this process of pushing the pull-request to Gerrit documented somewhere ?git can't push PRs which are github specific and live on the server but git can push commits.Follow [1] to learn how to push a change for review in Gerrit.Basically you need to
- create a project e.g. test in Gerrit here http://localhost:8080/admin/repos (assuming Gerrit runs on your local system and listens on port 8080)
- push the current state of the default branch on github (e.g. master) from a local clone of the github repo to the new project in gerrit
git push http://localhost:8080 master:master- push the branch representing the PR in github for review. Note that every commit on that branch will be one change in review in Gerrit
since Gerrit implements a commit-centric review workflow
git checkout <local branch of your PR>
git push origin HEAD:refs/for/master- review the change in the WebUI
please avoid top-posting on this list
* git remote add gerrit_origin //MY_HOST/REPO_NAME
* git push gerrit_origin master:masterUsername for 'http://MY_HOST:8080': adminPassword for 'http://admin@MY_HOST:8080':! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 'http://MY_HOST:8080/MY_REPO'hint: Updates were rejected because a pushed branch tip is behind its remotehint: counterpart. Check out this branch and integrate the remote changeshint: (e.g. 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.git pull doesn't help....* git push --force g_origin master:masterUsername for 'http://MY_HOST:8080': adminPassword for 'http://admin@MY_HOST:8080':Counting objects: 21306, done.Delta compression using up to 8 threads.Compressing objects: 100% (15715/15715), done.Writing objects: 100% (21306/21306), 112.74 MiB | 50.79 MiB/s, done.Total 21306 (delta 4961), reused 15884 (delta 4839)remote: Resolving deltas: 100% (4961/4961)remote: error: branch refs/heads/master:remote: You need 'Push' rights with 'Force' flag set to do a non-fastforward push.remote: User: adminremote: Contact an administrator to fix the permissionsremote: Processing changes: refs: 1, done! [remote rejected] master -> master (prohibited by Gerrit: not permitted: force update)error: failed to push some refs to 'http://MY_HOST:8080/MY_REPO'
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CACAbcoswGTbfkRWthU%2BCR2Z%3DHqVpaKS%2BH-ktf7_3_2ou69LaAQ%40mail.gmail.com.