Hi there,
i installed Trac according to the instructions 
on http://trac.edgewall.org/wiki/TracInstall 
and http://trac.edgewall.org/wiki/TracModWSGI .
So far, Trac works just fine.

Now i am trying to get Git working with Trac, but i just wont work and i 
dont know why. I hop you can help me!

The System informations:
PackageVersionTrac1.0.1Genshi0.7 (with speedups)mod_wsgi3.4 
(WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})MySQLserver: 
"5.5.37-MariaDB", client: "5.5.37-MariaDB", thread-safe: 
1MySQLdb1.2.5Python2.7.5 
(default, Jun 17 2014, 18:11:42) [GCC 4.8.2 20140120 (Red Hat 4.8.2-16)]
setuptools0.9.8jQuery1.7.2
What i've done or tried so far:


   1. yum install git
   2. vim /usr/share/trac/projects/mytrac/conf/trac.ini
   1. repository_type = git
      2. [components]
      tracopt.versioncontrol.git.* = enabled 
   3. adduser git
   4. mkdir -p /srv/git/myrepo && cd /srv/git/myrepo
   5. git --bare init --shared=true
   6. chown -R git:git -R /srv/git/myrepo
   
At this point i can check out and check in changes from anywhere.
Now to the step where i need to connect trac with my repository:
In the admin-panel "Manage Repositories" i add the repository 
(/srv/git/myrepo) and resync it with "trac-admin 
/usr/share/trac/projects/mytrac/ repository resync "*"
After this, there should be a "Browse" button in menu. But there isn. No 
errors are displayed but in the logfile i found this: 

2014-08-21 19:29:00,106 Trac[git_fs] INFO: detected GIT version 1.8.3.1
2014-08-21 19:29:00,107 Trac[PyGIT] ERROR: GIT control files missing in 
'/srv/git/myrepo'


According to http://trac.edgewall.org/wiki/TracGit i need to set the 
repository to /srv/git/myrepo/.git. But i dont get a .git directory if i 
init it with the --bare flag.
Also, i cant push changes to the repository if i dont use the --bare flag.
If i try, i get the following error:

remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare 
repository
remote: error: is denied, because it will make the index and work tree 
inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to 
match
remote: error: the work tree to HEAD.
remote: error: 
remote: error: You can set 'receive.denyCurrentBranch' configuration 
variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing 
into
remote: error: its current branch; however, this is not recommended unless 
you
remote: error: arranged to update its work tree to match what you pushed in 
some
remote: error: other way.
remote: error: 
remote: error: To squelch this message and still keep the default 
behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 
'refuse'.
To [email protected]:/srv/git/myrepo


And even if i create a repository without the --bare flag, i am getting the 
same error (GIT control files missing in '/srv/git/myrepo').

Can you please help me out... i dont know what else i can try...

Regards,

Pascal












-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to