On Thu, Jun 22, 2017, at 02:04 AM, Raghuram Vadapalli wrote: > I am trying to checkout a change from gerrit using git review -d > <changeID> > -v. > > I am getting following error: > > 2017-06-21 23:40:20.187678 Running: git config --get gitreview.scheme > 2017-06-21 23:40:20.190498 Running: git config --get gitreview.hostname > 2017-06-21 23:40:20.193283 Running: git config --get gitreview.port > 2017-06-21 23:40:20.196035 Running: git config --get gitreview.project > 2017-06-21 23:40:20.198816 Running: git log --color=never --oneline > HEAD^1..HEAD > 2017-06-21 23:40:20.202041 Running: git remote > 2017-06-21 23:40:20.204871 Running: git branch -a --color=never > 2017-06-21 23:40:20.207789 Running: git config --get > remote.origin.pushurl > 2017-06-21 23:40:20.210567 Running: git config --list > Found origin Push URL: https://git.opendaylight.org/gerrit > Query gerrit > https://git.opendaylight.org/changes/?q=59148&o=CURRENT_REVISION > 2017-06-21 > <https://git.opendaylight.org/changes/?q=59148&o=CURRENT_REVISION2017-06-21> > 23:40:20.213423 Running: git config --bool --get http.sslVerify > /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:838: > InsecureRequestWarning: Unverified HTTPS request is being made. Adding > certificate verification is strongly advised. See: > https://urllib3.readthedocs.io/en/latest/security.html > InsecureRequestWarning) > Cannot query patchset information > The following command failed with exit code 104 > "GET > https://git.opendaylight.org/changes/?q=59148&o=CURRENT_REVISION" > ----------------------- > <html> > <head> > <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> > <title>Error 404 </title> > </head> > <body> > <h2>HTTP ERROR: 404</h2> > <p>Problem accessing /changes/. Reason: > <pre> Not Found</pre></p> > <hr /><i><small>Powered by Jetty://</small></i> > </body> > </html> > > ----------------------- > > It is clearly because git-review is removing /gerrit from the url. It > will > work properly if it queries > https://git.opendaylight.org/gerrit/changes/?q=59148&o=CURRENT_REVISIONinstead > of https://git.opendaylight.org/changes/?q=59148&o=CURRENT_REVISION. > > The following is my git config: > > user.email=<some mail>user.name=<Name> > push.default=simple > filter.lfs.clean=git-lfs clean -- %f > filter.lfs.smudge=git-lfs smudge -- %f > filter.lfs.required=true > credential.helper=cache --timeout=1000000 > url.https://github.com.insteadof=git://github.com > gpg.program=gpg2 > core.repositoryformatversion=0 > core.filemode=true > core.bare=false > core.logallrefupdates=true > remote.origin.url=https://git.opendaylight.org/gerrit/a/integration/test > remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* > remote.origin.push=HEAD:refs/for/master > branch.master.remote=origin > branch.master.merge=refs/heads/master > http.proxy=<my proxy server> > http.sslverify=false > https.proxy=<my proxy server> > gitreview.remote=origin > gitreview.scheme=http > gitreview.hostname=https://git.opendaylight.org/gerrit/ > gitreview.port=80 > gitreview.project=integration/test > <https://git.opendaylight.org/gerrit/gitreview.port=80gitreview.project=integration/test> This is indeed a bug. It looks like the bug is not present if you use ssh gerrit remotes so that is a possible workaround. That said, I am having a hard time reproducing 'Found origin Push URL: https://git.opendaylight.org/gerrit' when 'remote.origin.url=https://git.opendaylight.org/gerrit/a/integration/test'. What we want to do is remove gitreview.project from the found push url and then append 'changes/?q=foo' in order to run the query but I don't think that will work in your case either because the push url is incomplete (lacks 'a/integration/test'). Any idea how that is the case? maybe your git config is incomplete or changed? I've pushed up https://review.openstack.org/478325 to address this but it will only work if the push url is accurate. Perhaps you can test this change out? Hope this helps, Clark