4849: rbt post with error (HTTP 400, API Error 224)

xiahui

What version are you running?

3.0.15 reviewboard
1.0.2 RBTools

What's the URL of the page containing the problem?

N/A

What steps will reproduce the problem?

  1. Setup a repository on reviewboard.
    Name: os-task-management

REPOSITORY HOSTING
Hosting service:

REPOSITORY INFORMATION
Repository type:
Path: remote git
For local Git repositories, this should be the path to a .git directory that Review Board can read from. For remote Git repositories, it should be the clone URL.

  1. rbt setup-repo
  2. rbt post

What is the expected output? What do you see instead?

RBTools 1.0.2
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 13:10:39)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
Running on Darwin-19.0.0-x86_64-i386-64bit
Home = /Users/aaa
Current directory = /Users/aaa/IdeaProjects/os-nlu
Command line: rbt post --debug
Running: tf vc help
Checking for a Git repository...
Running: git rev-parse --git-dir
Running: git config core.bare
Running: git rev-parse --show-toplevel
Running: git symbolic-ref -q HEAD
Running: git config --get branch.master.merge
Running: git config --get branch.master.remote
Running: git config --get remote.origin.url
Repository info: Path: http://url:8090/ChatBotPlatform/OS/os-nlu.git, Base path: , Supports changesets: False
Making HTTP GET request to http://url:8087/api/
Running: git rev-parse refs/heads/master
Running: git config --get branch.master.merge
Running: git config --get branch.master.remote
Running: git branch --remotes
Running: git rev-parse origin/master
Running: git rev-list 970755582abb7549da5125f9b5ed77813f72cd38 --not --remotes=origin
Running: git status --porcelain --untracked-files=no --ignore-submodules=dirty
Running: git version
Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 970755582abb7549da5125f9b5ed77813f72cd38..f5426642a62a7345e7fc87d2f189d82364cecb0e
Generated diff size: 1950 bytes
Making HTTP GET request to http://url:8087/api/validation/diffs/
Cached response for HTTP GET http://url:8087/api/validation/diffs/ expired and was modified
Making HTTP POST request to http://url:8087/api/validation/diffs/
Got API Error 224 (HTTP code 400): fatal: not a git repository: 'None'

Error data: {u'stat': u'fail', u'err': {u'msg': u"fatal: not a git repository: 'None'\n", u'code': 224}}
Traceback (most recent call last):
File "/Users/aaa/miniconda2/bin/rbt", line 11, in <module>
load_entry_point('RBTools==1.0.2', 'console_scripts', 'rbt')()
File "/Users/aaa/miniconda2/lib/python2.7/site-packages/RBTools-1.0.2-py2.7.egg/rbtools/commands/main.py", line 120, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "/Users/aaa/miniconda2/lib/python2.7/site-packages/RBTools-1.0.2-py2.7.egg/rbtools/commands/init.py", line 725, in run_from_argv
exit_code = self.main(*args) or 0
File "/Users/aaa/miniconda2/lib/python2.7/site-packages/RBTools-1.0.2-py2.7.egg/rbtools/commands/post.py", line 875, in main
(msg_prefix, e))
rbtools.commands.CommandError: Error validating diff

What operating system are you using? What browser?

reviewboard server: ubuntu 18.04
RBTools: Mac

Please provide any additional information below.

I successfully posted a CR in my 50+ testing.

david
#1 david

You didn't share exactly how the git repository is configured on the server, but I'm guessing you just dropped in the clone URL, which won't work. Git's remote protocol isn't sufficient for Review Board, and you'll need an intermediate API layer such as rb-gateway, GitWeb, or cgit. See https://www.reviewboard.org/docs/manual/3.0/admin/configuration/repositories/git/#repository-scm-git for details.

  • -New
    +SetupIssue
xiahui
#2 xiahui

Thanks, I use Gitlab, I setup git repository by git Lab settings. And it is wokring fine.