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

27 views
Skip to first unread message

Gu Xiahui

unread,
Nov 20, 2019, 1:38:25 PM11/20/19
to Review Board Community
Hi guys,
I tried to use rbt post to post a new CR request. But I got error  fatal: not a git repository: 'None' (HTTP 400, API Error 224)

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/zhangwei

>>> Current directory = /Users/zhangwei/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://home6v.asuscomm.com:8090/ChatBotPlatform/OS/os-nlu.git, Base path: , Supports changesets: False

>>> Making HTTP GET request to http://home6v.asuscomm.com: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://home6v.asuscomm.com:8087/api/validation/diffs/

>>> Cached response for HTTP GET http://home6v.asuscomm.com:8087/api/validation/diffs/ expired and was modified

>>> Making HTTP POST request to http://home6v.asuscomm.com: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/zhangwei/miniconda2/bin/rbt", line 11, in <module>

    load_entry_point('RBTools==1.0.2', 'console_scripts', 'rbt')()

  File "/Users/zhangwei/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/zhangwei/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/zhangwei/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

David Trowbridge

unread,
Nov 20, 2019, 1:40:44 PM11/20/19
to reviewboard
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.

David

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/0beb4bb2-0df4-4e8c-83f5-b2ad9e195ea7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages