You are here
Trac usage: Creating and accessing projects
The below usage notes are dependent on trac-initproject.
The exemplary project name is called foobar.
git
To initialize the project, log into the Trac server and execute:
trac-initproject git foobar
Developers can then upload their local master branch using the following methods:
If public push access is enabled:
git-push git://appliance_ip/git/foobar master
Or, over an SSH connection:
git-push ssh://root@appliance_ip/srv/repos/git/public/foobar.git master
Optionally, the developer can configure the remote repository for simpler future updates:
git-config remote.turnkey-trac.url ssh://root@appliance_ip/srv/repos/git/public/foobar.git git-config remote.turnkey-trac.push +master:refs/heads/master git-push turnkey-trac
Users can then clone the remote repository using the following methods:
Anonymously:
git-clone git://appliance_ip/git/foobar
Or, over an SSH connection:
git-clone ssh://root@appliance_ip/srv/repos/git/foobar
As of v14.0, Bazaar is no longer supported.
Bazaar (bzr)
To initialize the project, log into the Trac server and execute:
trac-initproject bzr foobar
Developers can then upload their local branch:
Over an SFTP connection (depends on python-paramiko)
bzr push sftp://root@1.0.0.94/srv/repos/bzr/foobar
If there is no default push location set, the first push will set it. After that, the location can be omitted and the default will be used:
bzr push
Users can then clone the remote repository:
bzr clone bzr://appliance_ip/bzr/foobar
Mercurial (hg)
To initialize the project, log into the Trac server and execute:
trac-initproject hg foobar
Developers can then upload their local branch using the following methods:
Note the extra slash. Mercurial assumes paths are relative to the users home directory over SSH connections:
hg push ssh://root@appliance_ip//srv/repos/hg/foobar
Optionally, the developer can configure the remote repository for simpler future updates, by adding the following to foobar/.hg/hgrc
[paths] default-push = ssh://root@appliance_ip//srv/repos/hg/foobar
Future pushes can then be performed as follows:
hg push
Users can then clone the remote repository:
hg clone http://appliance_ip:8080/foobar
Subversion (svn)
To initialize the project, log into the Trac server and execute:
trac-initproject svn foobar
Developers can then checkout the remote repository, make changes, then commit back to the remote repository:
Checkout over SSH:
svn co svn+ssh://root@appliance_ip/srv/repos/svn/foobar
After making local changes, they can be commited to the remote repository:
svn commit
Users can then checkout the remote repository using the following methods:
Anonymously:
svn co svn://appliance_ip/svn/foobar
Or, over an SSH connection:
svn co svn+ssh://root@appliance_ip/srv/repos/svn/foobar
Comments
Thanks!
My thanks to both René and "Guest" for their responses. I decided to go along with the latter's, as it's less "intrusive" and my repository isn't especially sensitive (so no need for SSH).
GIT: Line 75: git-init: command not found
Hello,
I am trying to use the helper script to create a new GIT project. When executing from the command line:
Trying to add Trac to a Revision Control appliance - need help
Hi,
Unfortunately, the appliance we installed was the Revision Control one for SVN. I am trying to add Trac on the same machine. Here are the commands that I ran:
1. sudo apt-get install trac : It appeared to install Trac and I could see it as installed from the Webmin UI)
2. Created the script - http://www.turnkeylinux.org/docs/trac/trac-initproject
3. Ran sudo trac-initproject svn TestRepo (TestRepo was already existing and it complained that svnadmin: '/srv/repos/svn/TestRepo' is a subdirectory of an existing repository rooted at '/srv/repos/svn/TestRepo'
4. Ran it again on a repo that didn't exist
sudo trac-initproject svn testtickets