ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Unable to browse nor integrate GIT repository with Chiliproject

Added by James Ang at 2011-10-18 02:40 am

Dear all,

I've just install a fresh v2.3.0 on my Ubuntu 11.04 x64 machine.
I'm running Apache2+mySQL v5.5+Passenger in sub-URI method and using 'bundle install' to get the gems needed.

I've successfully integrated SVN repository with user authentication as according to both Redmine/Chiliproject wiki.
Using SCM Creator plug-in 0.2.0, I can even create bare SVN repository on local folder.

Now, I need help to integrate GIT repository feature with user authentication but even the basic browsing of a cloned git repository folder couldn't be done.

I keep getting "404: The entry or revision was not found in the repository."
The production.log will have the following entry

Processing RepositoriesController#show (for 127.0.0.1 at 2011-10-18 09:47:33) [GET]
Parameters: {"action"=>"show", "id"=>"u-boot", "controller"=>"repositories"}
Rendering template within layouts/base
Rendering common/error (404)
Completed in 412ms (View: 296, DB: 3) | 404 Not Found [http://localhost/chiliproject/projects/u-boot/repository]

SCM Creator can't create any GIT folder even into the same SVN folder too.
Even given 0777 full read/write access to the git folder, the same error occurs.

4.0K drwxrwxrwx  5 www-data www-data 4.0K 2011-10-17 17:20 git
4.0K drwxrwxr-x  5 www-data www-data 4.0K 2011-10-13 14:07 svn

Processing RepositoriesController#show (for 127.0.0.1 at 2011-10-18 09:47:33) [GET]
Parameters: {"action"=>"show", "id"=>"u-boot", "controller"=>"repositories"}
Rendering template within layouts/base
Rendering common/error (404)
Completed in 412ms (View: 296, DB: 3) | 404 Not Found [http://localhost/chiliproject/projects/u-boot/repository]

Processing ProjectsController#index (for 127.0.0.1 at 2011-10-18 10:19:13) [GET]
Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 48ms (View: 40, DB: 1) | 200 OK [http://localhost/chiliproject/projects]

Processing ProjectsController#show (for 127.0.0.1 at 2011-10-18 10:19:14) [GET]
Parameters: {"action"=>"show", "id"=>"x-loader", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/show
Completed in 94ms (View: 36, DB: 10) | 200 OK [http://localhost/chiliproject/projects/x-loader]

Processing ProjectsController#settings (for 127.0.0.1 at 2011-10-18 10:19:16) [GET]
Parameters: {"action"=>"settings", "id"=>"x-loader", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/settings
Completed in 168ms (View: 152, DB: 4) | 200 OK [http://localhost/chiliproject/projects/x-loader/settings]

Processing RepositoriesController#edit (for 127.0.0.1 at 2011-10-18 10:19:19) [GET]
Parameters: {"action"=>"edit", "authenticity_token"=>"7IQdTyNoTYeHSq7Dj1oHPMDMoa2rYm9YUpwYZHYObS4=", "id"=>"x-loader", "con$
Completed in 34ms (View: 23, DB: 1) | 200 OK [http://localhost/chiliproject/projects/x-loader/repository/edit?authenticity_to$

Processing RepositoriesController#edit (for 127.0.0.1 at 2011-10-18 10:19:20) [POST]
Parameters: {"repository"=>{"path_encoding"=>"", "url"=>"/usr/local/lib/chiliproject/files/git/x-loader.git"}, "commit"=>"C$
Creating Git reporitory: /usr/local/lib/chiliproject/files/git/x-loader.git
Repository creation failed
Completed in 372ms (View: 220, DB: 124) | 200 OK [http://localhost/chiliproject/projects/x-loader/repository/edit]

Processing RepositoriesController#edit (for 127.0.0.1 at 2011-10-18 10:19:22) [POST]
Parameters: {"commit"=>"Create new repository", "repository"=>{"path_encoding"=>""}, "action"=>"edit", "authenticity_token"$
Completed in 58ms (View: 24, DB: 3) | 200 OK [http://localhost/chiliproject/projects/x-loader/repository/edit]

Processing RepositoriesController#show (for 127.0.0.1 at 2011-10-18 10:19:23) [GET]
Parameters: {"action"=>"show", "id"=>"x-loader", "controller"=>"repositories"}
Rendering template within layouts/base
Rendering common/error (404)
Completed in 113ms (View: 37, DB: 3) | 404 Not Found [http://localhost/chiliproject/projects/x-loader/repository]

Even with SCM Creator plug-in removed. I couldn't browse the any cloned or bare GIT repository.

The same is happening with my other Redmine v1.2.1 installation on the same machine via a different sub-URI.

I've posted all information that I used to troubleshoot the installation below

Any help is most appreciated.

Thanks

James.

--- Troubleshooting Logs ---
With SCM Creator installed

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.1.2
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Application root          /usr/local/lib/chiliproject
Environment               production
Database adapter          mysql
Database schema version   20110729125454

About your Redmine plugins
SCM Creator   0.2.0

With SCM Creator removed

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.1.2
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Application root          /usr/local/lib/chiliproject
Environment               production
Database adapter          mysql
Database schema version   20110729125454

The entire chiliproject folder has the following property
4.0K drwxr-xr-x 18 www-data www-data 4.0K 2011-10-17 15:53 chiliproject/
4.0K drwxr-xr-x  6 www-data www-data 4.0K 2011-09-30 09:50 app/
4.0K drwxr-xr-x  3 www-data www-data 4.0K 2011-10-17 15:51 .bundle/
4.0K drwxr-xr-x  5 www-data www-data 4.0K 2011-10-17 13:53 config/
4.0K drwxr-xr-x  3 www-data www-data 4.0K 2011-09-30 15:06 db/
4.0K drwxr-xr-x  2 www-data www-data 4.0K 2011-10-14 16:31 doc/
4.0K drwxr-xr-x  5 www-data www-data 4.0K 2011-09-30 09:50 extra/
4.0K drwxr-xr-x  4 www-data www-data 4.0K 2011-10-17 12:26 files/
4.0K drwxr-xr-x  8 www-data www-data 4.0K 2011-10-14 16:33 .git/
4.0K drwxr-xr-x  7 www-data www-data 4.0K 2011-09-30 09:50 lib/
4.0K drwxr-xr-x  2 www-data www-data 4.0K 2011-09-30 15:05 log/
4.0K drwxr-xr-x  3 www-data www-data 4.0K 2011-09-30 13:57 mysql/
4.0K drwxr-xr-x  7 www-data www-data 4.0K 2011-09-30 10:12 public/
4.0K drwxr-xr-x  4 www-data www-data 4.0K 2011-09-30 09:50 script/
4.0K drwxr-xr-x  8 www-data www-data 4.0K 2011-09-30 09:50 test/
4.0K drwxr-xr-x  7 www-data www-data 4.0K 2011-09-30 15:21 tmp/
4.0K drwxr-xr-x  3 www-data www-data 4.0K 2011-09-30 09:50 vendor/
4.0K -rw-r--r--  1 www-data www-data 2.1K 2011-09-30 09:50 Gemfile
4.0K -rw-r--r--  1 www-data www-data 2.1K 2011-10-17 15:53 Gemfile.lock
4.0K -rw-r--r--  1 www-data www-data  532 2011-09-30 09:50 .gitignore
0 -rw-r--r--  1 www-data www-data    0 2011-09-30 09:50 .gitmodules
4.0K -rw-r--r--  1 www-data www-data  519 2011-09-30 09:50 .hgignore
4.0K -rw-r--r--  1 www-data www-data  303 2011-09-30 09:50 Rakefile
4.0K -rw-r--r--  1 www-data www-data 1.8K 2011-09-30 09:50 README.rdoc

Apache2's virtual host

<VirtualHost *:80>
     ServerAdmin webmaster@local

     DocumentRoot /var/www

  <Directory />
     Options FollowSymLinks
     AllowOverride None
  </Directory>

  <Directory /var/www/>
     Options Indexes FollowSymLinks -MultiViews
     AllowOverride None
     Order allow,deny
     allow from all
  </Directory>

  <Directory /var/www/redmine>
     RailsEnv production
     RailsBaseURI /redmine
     Options -MultiViews
#    PassengerResolveSymlinksInDocumentRoot on
     Order deny,allow
     Allow from all
  </Directory>

  <Directory /var/www/chiliproject>
      RailsEnv production
      RailsBaseURI /chiliproject
      Options -MultiViews
#     PassengerResolveSymlinksInDocumentRoot on
      Order deny,allow
      Allow from all
  </Directory>

  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  <Directory "/usr/lib/cgi-bin">
     AllowOverride None
     Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
     Order allow,deny
     Allow from all
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
  LogLevel warn

  CustomLog ${APACHE_LOG_DIR}/access.log combined

  Alias /doc/ "/usr/share/doc/" 
  <Directory "/usr/share/doc/">
     Options Indexes MultiViews FollowSymLinks
     AllowOverride None
     Order deny,allow
     Deny from all
     Allow from 127.0.0.0/255.0.0.0 ::1/128
  </Directory>

</VirtualHost>

Rails is running as

www-data 26670  0.0  2.8 256984 109736 ?       S    09:46   0:02 Rails: /usr/local/lib/chiliproject

Passenger Module

<IfModule mod_passenger.c>
        PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.9
        PassengerRuby /usr/bin/ruby1.8
        PassengerDefaultUser www-data
        PassengerHighPerformance off
</IfModule>

Apache error.log when access the repository tab

[Tue Oct 18 10:37:25 2011] [notice] Apache/2.2.21 (Ubuntu) DAV/2 SVN/1.6.12 Phusion_Passenger/3.0.9 PHP/5.3.8-1~ppa3~natty wi$
fatal: Not a git repository: '/usr/local/lib/chiliproject/files/git/u-boot.git'


Replies (7)

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by Felix Schäfer at 2011-10-18 05:13 am

One thing first: Don't put your repositories in the files directory. In fact, it's best to not put anything yourself in the files directory, as ChiliProject puts uploaded files there, and I'm not sure what would happen if it tries to save stuff to files that already exist.

That said, that shouldn't prevent ChiliProject from reading the git repository.

As I said in the other thread, check that you have commits in the git repository, a new git repository doesn't have any and ChiliProject can't differentiate between no commits and no repository. You can also have a look at log/scm.stderr.log (or similar), there might be hints in there as to what the problem is. Lastly, also make sure that the git executable is in the path for the user running ChiliProject, in your case, try logging in as www-data (try something like sudo su - www-data, try adding -s /bin/bash if it tells you the account is not available) and see if just running git works.

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by James Ang at 2011-10-18 09:01 am

Hi Felix,

Felix Schäfer wrote:
One thing first: Don't put your repositories in the files directory. In fact, it's best to not put anything yourself in the files directory, as ChiliProject puts uploaded files there, and I'm not sure what would happen if it tries to save stuff to files that already exist.

That said, that shouldn't prevent ChiliProject from reading the git repository.

Tried in other location but still the same.

Felix Schäfer wrote:
As I said in the other thread, check that you have commits in the git repository, a new git repository doesn't have any and ChiliProject can't differentiate between no commits and no repository. You can also have a look at log/scm.stderr.log (or similar), there might be hints in there as to what the problem is.

I'm using a cloned git repository for U-Boot development and thus it is definitely not an empty, bare repository.
The clone is done by

sudo -u www-data git clone git://url u-boot.git

Also, I don't know where/if there is a scm.stderr.log file.
Where can I configure one?

Felix Schäfer wrote:
Lastly, also make sure that the git executable is in the path for the user running ChiliProject, in your case, try logging in as www-data (try something like sudo su - www-data, try adding -s /bin/bash if it tells you the account is not available) and see if just running git works.

Tried the www-data account and I can do git command to look at the commit log as per norm.

Please advise.

Thanks

James.

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by Felix Schäfer at 2011-10-18 10:56 am

James Ang wrote:

Felix Schäfer wrote:
One thing first: Don't put your repositories in the files directory. In fact, it's best to not put anything yourself in the files directory, as ChiliProject puts uploaded files there, and I'm not sure what would happen if it tries to save stuff to files that already exist.

That said, that shouldn't prevent ChiliProject from reading the git repository.

Tried in other location but still the same.

The point isn't that it could be the root of your problem (it isn't) but that it could lead to problems later. Don't put stuff in files yourself. Just don't.

Felix Schäfer wrote:
As I said in the other thread, check that you have commits in the git repository, a new git repository doesn't have any and ChiliProject can't differentiate between no commits and no repository. You can also have a look at log/scm.stderr.log (or similar), there might be hints in there as to what the problem is.

I'm using a cloned git repository for U-Boot development and thus it is definitely not an empty, bare repository.
The clone is done by

sudo -u www-data git clone git://url u-boot.git

Mmh, if you clone it as a "normal" repository, you might need to point ChiliProject to the .git repository in there. Alternatively, you could git clone --bare it, so that you can pick /path/to/u-boot.git instead of the .git directory in it. Also note that you don't need to call it u-boot.git, you can just call it u-boot.

Also, I don't know where/if there is a scm.stderr.log file.
Where can I configure one?

It doesn't need to be configured, it's in the log directory (as hinted by the path above) but only if the scm shell outs produce any error.

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by James Ang at 2011-10-19 06:59 am

Felix Schäfer wrote:
James Ang wrote:

Felix Schäfer wrote:
One thing first: Don't put your repositories in the files directory. In fact, it's best to not put anything yourself in the files directory, as ChiliProject puts uploaded files there, and I'm not sure what would happen if it tries to save stuff to files that already exist.

That said, that shouldn't prevent ChiliProject from reading the git repository.

Tried in other location but still the same.

The point isn't that it could be the root of your problem (it isn't) but that it could lead to problems later. Don't put stuff in files yourself. Just don't.

Yes, I totally agreed on that.

Felix Schäfer wrote:
James Ang wrote:

Felix Schäfer wrote:
As I said in the other thread, check that you have commits in the git repository, a new git repository doesn't have any and ChiliProject can't differentiate between no commits and no repository. You can also have a look at log/scm.stderr.log (or similar), there might be hints in there as to what the problem is.

I'm using a cloned git repository for U-Boot development and thus it is definitely not an empty, bare repository.
The clone is done by

sudo -u www-data git clone git://url u-boot.git

Mmh, if you clone it as a "normal" repository, you might need to point ChiliProject to the .git repository in there. Alternatively, you could git clone --bare it, so that you can pick /path/to/u-boot.git instead of the .git directory in it. Also note that you don't need to call it u-boot.git, you can just call it u-boot.

Ok, I point it into the .git folder within the repository and now it manage to show all the commit logs after a long, long run.
YEAH~!

As I intend to use this cloned repository for internal push to/pull from for local development before going upstream
can Chiliproject track new commits as it get push/pull into the folder without interaction on its own?

Felix Schäfer wrote:
James Ang wrote:

Also, I don't know where/if there is a scm.stderr.log file.
Where can I configure one?

It doesn't need to be configured, it's in the log directory (as hinted by the path above) but only if the scm shell outs produce any error.

Can't find any scm.stderr.log in chiliproject/log.

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by Felix Schäfer at 2011-10-19 07:09 am

James Ang wrote:

Ok, I point it into the .git folder within the repository and now it manage to show all the commit logs after a long, long run.
YEAH~!

The first run imports the whole history, it can take a little time on large-ish repos.

As I intend to use this cloned repository for internal push to/pull from for local development before going upstream
can Chiliproject track new commits as it get push/pull into the folder without interaction on its own?

See the FAQ, note that you could also put the command in a post-receive hook in your repository instead of having it run by a cron.

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by James Ang at 2011-10-19 07:51 am

Felix Schäfer wrote:

James Ang wrote:
Ok, I point it into the .git folder within the repository and now it manage to show all the commit logs after a long, long run.
YEAH~!

The first run imports the whole history, it can take a little time on large-ish repos.

I see that the first run has to be properly completed and not interrupted.
Else, I'm getting 500: SQL Duplicated Entries errors randomly.

Felix Schäfer wrote:

James Ang wrote:
As I intend to use this cloned repository for internal push to/pull from for local development before going upstream
can Chiliproject track new commits as it get push/pull into the folder without interaction on its own?

See the FAQ, note that you could also put the command in a post-receive hook in your repository instead of having it run by a cron.

I see the tricky part of setting up git user authentication, workflow and others coming into play now.
Wish me luck~ (><)"

Thanks for the pointers.

Cheers~~!
(^^,)

RE: Unable to browse nor integrate GIT repository with Chiliproject - Added by Felix Schäfer at 2011-10-19 11:26 am

James Ang wrote:

Thanks for the pointers.

You're welcome :-)

(1-7/7)