# Re: HELP! Setting up a Git repository under Review-Board on Windows Server 2003

```I would also like to mention that I reach this point because I have
modified my scmtools/git.py file as suggested on the StackOverflow
website:
Replaced self.git_dir = url_parts[2] with: self.git_dir = url_parts[1]
+ url_parts[2]```
```
If I revert the change, I get this error:
Permission denied accessing the local Git repository '/Repository/Git/
sdu-test.git'

On Aug 22, 10:39 am, hbCyber <jean.sebastien.le...@gmail.com> wrote:
> Sorry to resuscitate this old discussion, but I STILL haven't managed
> to get Review-Board to work on my server.
>
> I'm now using the path file://D:/Repository/Git/sdu-test.git as it
> seems to 'work' the most.
>
> Now, based on your recommendation, I checked my PATH environment
> variable. I tried with both the Cygwin Git AND the mSysGit binaries
> (separately). In both cases, the Git executable is accessible (tested
> by just doing Start->Run->"git") yet in both cases I have the exact
> same error message in my Apache log file when trying to add my
> repository:
>
> ERROR:root:Git: Failed to find valid repository
> file://D:/Repository/Git/sdu-test.git:
> error: cannot spawn sh: No such file or directory
> fatal: unable to fork
>
> Again, I am really clueless, None of the Gits I have seem to work. Any
> suggestions??
>
> On Jul 7, 2:36 pm, Christian Hammond <chip...@chipx86.com> wrote:
>
>
>
>
>
>
>
> > Okay, I think then that the file:// you had was correct, and the problem has
> > to do with the setup of Cygwin.
>
> > When Cygwin was installed, was it configured by your user, or all users?
>
> > If it complained about finding sh, then it sounds like Cygwin isn't in
> > Apache's path. Check the PATH environment variable in System Settings and
> > make sure that the global PATH contains the Cygwin bin directories.
>
> > Christian
>
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
>
> > On Wed, Jul 6, 2011 at 11:30 PM, hbCyber
> > <jean.sebastien.le...@gmail.com>wrote:
>
> > > Thank you for your continued support, Mr. Hammond. It's really
> > > appreciated!
>
> > > The StackOverflow answer can be found at:
>
> > >http://stackoverflow.com/questions/6107439/setting-up-a-git-repositor...
>
> > > 1) When trying to use a nativeWindowspath:
> > > - D:\LocalClones\sdu-test (local clone) OR D:\Repository\Git\sdu-test
> > > (core git repository) --> I get the (11001, 'getaddrinfo failed')
> > > error.
>
> > > 2) When using the Cygwin path, it gives me the 'permission denied'
> > > error, nothing in the Apache log file. I even made sure I included the
> > > Cygwin paths in my Apache configuration file, so it's really because
> > > the Apache server does not recognize that path.
>
> > > 3) Running git ls-remote from the mSysGit Bash returns results:
> > > \$ git ls-remote D:/LocalClones/sdu-test
> > > 991bb49dbacd5bf4123ab9ac5c2285836a01af35        refs/remotes/origin/
> > > 991bb49dbacd5bf4123ab9ac5c2285836a01af35        refs/remotes/origin/
> > > master
>
> > > \$ git ls-remote D:/Repository/Git/sdu-test
>
> > > 4) Trying the above Git bash paths in ReviewBoard (D:/LocalClones/sdu-
> > > test and D:/Repository/Git/sdu-test): returns the (11001, 'getaddrinfo
> > > failed')
>
> > > 5) Trying again with the file:// approach:
> > > - file://D:/LocalClones/sdu-test  -->
> > > <django.utils.functional.__proxy__ object at 0x04974630> error
> > > - file://D:/Repository/Git/sdu-test  --> Permission denied accessing
> > > the local Git repository 'D:/Repository/Git/sdu-test/' ... which is
> > > weird actually. Running 'git ls-remote D:/Repository/Git/sdu-test'
> > > actually works in the mSysGit bash shell.
>
> > > To top it off, if I literally write: file://D:/Repository/Git/sdu-test.git
> > > , I get the error: A repository was not found at the specified path.
> > > Looking into the Apache log file, I find:
>
> > > C:\Python25\lib\site-packages\django-1.3-py2.5.egg\django\db
> > > \__init__.py:19: DeprecationWarning: settings.DATABASE_* is
> > > deprecated; use settings.DATABASES instead.
> > >  DeprecationWarning
> > > C:\Python25\lib\site-packages\django-1.3-py2.5.egg\django\db
> > > \__init__.py:60: DeprecationWarning: Short names for ENGINE in
> > > database configurations are deprecated. Prepend default.ENGINE with
> > > 'django.db.backends.'
> > >  DeprecationWarning
> > > C:\Python25\lib\site-packages\Crypto\Util\randpool.py:40:
> > > RandomPool_DeprecationWarning: This application uses RandomPool, which
> > > is BROKEN in older releases.  Seehttp://www.pycrypto.org/randpool-broken
> > >  RandomPool_DeprecationWarning)
> > > C:\Python25\lib\site-packages\django-1.3-py2.5.egg\django\core
> > > \context_processors.py:27: DeprecationWarning: The context processor
> > > at `django.core.context_processors.auth` is deprecated; use the path
> > >  DeprecationWarning
> > > C:\Python25\lib\site-packages\django-1.3-py2.5.egg\django\template
> > >  DeprecationWarning
> > > C:\Python25\lib\site-packages\django-1.3-py2.5.egg\django\template
> > >  DeprecationWarning
> > > C:\Python25\lib\site-packages\django-1.3-py2.5.egg\django\contrib\auth
> > > \models.py:393: DeprecationWarning: The user messaging API is
> > > deprecated. Please update your code to use the new messages framework.
> > >  category=DeprecationWarning)
> > > ERROR:root:Git: Failed to find valid repository
> > > file://D:/Repository/Git/sdu-test.git:
> > > error: cannot spawn sh: No such file or directory
> > > fatal: unable to fork
>
> > > Any idea what I should try next?
>
> > > On Jul 7, 1:51 pm, Christian Hammond <chip...@chipx86.com> wrote:
> > > > Hi,
>
> > > > Where on StackOverflow did you get that answer? I'm curious why you'd
> > > have
> > > > to modify that file (it will certainly make upgrades harder).
>
> > > > That __proxy__ error has been seen a few times, and is often some error
> > > not
> > > > being propagated properly. Check your server logs and see if there are
> > > any
> > > > more detailed errors there.
>
> > > > Which Git are you using onWindows?
>
> > > > A couple things to try:
>
> > > > 1) Use a nativeWindowspath for the repository: D:\Repositories\...
> > > > 2) If using Cygwin's git, try the cygdrive path for D: that you'd use in
> > > the
> > > > Cygwin shell.
> > > > 3) With any path you try, verify that it works in the shell on that
> > > system
> > > > using:
>
> > > >     git ls-remote <path> HEAD
>
> > > > Where <path> is what you're inputting into the Repository form.
>
> > > > Christian
>
> > > > --
> > > > Christian Hammond - chip...@chipx86.com
> > > > Review Board -http://www.reviewboard.org
> > > > VMware, Inc. -http://www.vmware.com
>
> > > > On Wed, Jul 6, 2011 at 10:43 PM, hbCyber <jean.sebastien.le...@gmail.com
> > > >wrote:
>
> > > > > Oops, I am using ReviewBoard 1.5.5 - not 1.5.1.
>
> > > > > On Jul 7, 1:34 pm, hbCyber <jean.sebastien.le...@gmail.com> wrote:
> > > > > > Hi guys, I made some progress with regards to my situation.
>
> > > > > > I am using ReviewBoard 1.5.1;
> > > > > > According to an answer I got from StackOverflow, I modified the
> > > > > > \reviewboard\scmtools\git.py file, and replaced the following lines:
>
> > > > > > self.git_dir = url_parts[2]
>
> > > > > > with:
>
> > > > > > self.git_dir = url_parts[1] + url_parts[2]
>
> > > > > > I also modified my Apache configuration file to ensure that Apache
> > > has
> > > > > > Now, there remains one problem. When I try to add my repository with
> > > > > > the following format: file://D:/Repositoires/LocalClones/sdu-test ,
> > > > > > I
> > > > > > get the following error:
> > > > > > <django.utils.functional.__proxy__ object at 0x049AA7B0>
>
> > > > > > Nothing in my Apache log file seems to indicate a problem...
>
> > > > > > Anyone has any clue as to why I'm getting this error?
>
> > > > > > On Jun 7, 5:21 pm, hbCyber <jean.sebastien.le...@gmail.com> wrote:
>
> > > > > > > Thanks for the update. Sadly, I have yet to get Review Board to
> > > work
> > > > > > > with my Git repositories. Good to know, however, that I do not
> > > > > > > need
> > > a
> > > > > > > local clone. I will experiment more with the permissions settings
> > > and
> > > > > > > see if I can come up with something. Suggestions are still
> > > > > > > welcome;
> > > I
> > > > > > > will post an update if I manage to get this to work.
>
> > > > > > > Cheers,
> > > > > > > Jean
>
> > > > > > > On Jun 3, 3:40 am, Christian Hammond <chip...@chipx86.com> wrote:
>
> > > > > > > > Hi Jean,
>
> > > > > > > > Sorry for the late reply. Hope you've figured this out by now.
>
> > > > > > > > So, it sounds as if the main repositories are also on that same
> > > > > system, or
> > > > > > > > at least accessible by it? If that's the case, you don't need
> > > > > separate
> > > > > > > > clones. Review Board can access the main repository.
>
> > > > > > > > The permission errors issues sound exactly like say. Apache may
> > > not
> > > > > have
> > > > > > > > permission to access that directory. Make sure ownership and
> > > > > permissions are
> > > > > > > > correct so that that user can get to it.
>
> > > > > > > > The getaddrinfo error indicates that it's not looking up
> > > "localhost"
> > > > > > > > properly on your system. (This isn't a Review Board thing.) You
> > > could
> > > > > try
> > > > > > > > 127.0.0.1, but using the file path is probably better, once you
> > > > > figure out
> > > > > > > > the permission denied problems.
>
> > > > > > > > Christian
>
> > > > > > > > --
> > > > > > > > Christian Hammond - chip...@chipx86.com
> > > > > > > > Review Board -http://www.reviewboard.org
> > > > > > > > VMware, Inc. -http://www.vmware.com
>
> > > > > > > > On Mon, May 30, 2011 at 10:33 PM, hbCyber <
> > > > > jean.sebastien.le...@gmail.com>wrote:
>
> ...
>