TurnKey Linux Virtual Appliance Library

Revision Control

After installation I can see and access the HelloWorld repo, but I can't see how to add a new repo.

-Todd

Revision Control - How to Add a Repository for GIT

 

I've tried both SVN and GIT.

I must be overlooking something.

Revision Control Appliance

Anyone out there using this appliance?

Adrian VanRassel's picture

How to make svn repo

You have to be in terminal to do this.  Its only a 2 step process :)

 

 

1) cd /srv/repos/svn

2) svnadmin create test

Change test with the repo you want to make.  For more svn administrative commands, here is a link: http://svnbook.red-bean.com/en/1.1/ch09.html

[edit]

I'll add a bit more, just in case you ask the question "how do I set up the svn to redmine".  Once the repo is created, create the project (anyname).  In the "Settings" tab of the project, select "Repository" tab.  From the "SCM" combobox, select "Subversion".  In the "URL" section, put in:

file:///srv/repos/svn/test

where test is the svn repository created from before.


How to make svn repo

Ok, thanks, I'll try it.

Is it a similar process for GIT?

I have been using both SVN and GIT for a while, but almost always with GUI interfaces.  I guess I gotta learn the cmdline stuff.

Instructions for using Git

After a few hours of tinkering I finally have git working on my Revision Control appliance.  There are a few things that were not really intuitive so I figured I'd share what I learned.  I know it has been 6 months since this question was posed, but I figured here was as good a place as any.

To clone the hello world repo run:

git clone git://<hostname>/git/helloworld.git

This will get you a read only version.

To make a writeable repo the only way I could figure has a few steps and requires ssh and the root password.  I'm not sure how to set this up in a multi-user fashion.

SSH into the appliance and run:

cd /var/repos/git
git init --bare project.git
# to allow read-only access via git://...
touch project.git/git-daemon-export-ok
# to have your source show up in gitweb
cd public
ln -s /srv/repos/git/project.git project.git

Now you will need to clone the repo:

git clone root@<hostname>:/srv/repos/git/project.git

Or, if you already have a local git repository and want to push everything into the appliance:

git remote add origin root@<hostname>:/srv/repos/git/project.git
git push origin master

This should get you up and running using git on the Revision Control appliance.  I'm not certain that this is the best way, but it worked for me.

 

Good Luck!

-Steve

Edit: forgot to add some references:

Thank you!!!

This info helped very much.  I think you had one little typo.  

cd /var/repos/git
# should be
cd /srv/repos/git

Thanks...

Thanks this helped a

Thanks this helped a lot!

As for the root problem, just change the git folder to be read and writeable by a different group then root, and then add users to that group.  Works great.

Users

I was just wandering how to introduce users.... (make private repos)

Last comment was excellent hint. Thank you!

Adrian VanRassel's picture

Git instead...

I haven't used Git personally.  Here is a link to Git commands.  Maybe this will be useful if you're looking into making a Git repo:  http://jonas.nitro.dk/git/quick-reference.html


Need Syntax of URL to access HelloWorld repos from TortoiseSVN

I am looking for the correct syntax to connect to the 'HelloWorld' repos on the RCA vm.  I known that it's svn+ssh://username192.168.nnn.nnn/???/.../???/helloworld but I really don't know what comes after the 'nnn/'.

I am trying to access the HelloWorld test repos the comes with the Revision Control Appliance using TortoiseSVN from an external box connecting over the network.

I can create a test repos of my own and then connect over the network with the TortoiseSVN client.

However, I haven't been able to connect to any repos from the default Web inerface AND from TortoiseSVN.  This would be really helpful and would really add the flexibility of the choice of interface for the user.

Thanks in advance for your thoughts.

KLJ


Using tortoise to access svn

I saw the last comment and figured I would post how I got tortoise to connect. The one thing I was missing when you use repository browser point it at svn://hostname/svn/helloworld. That should at least allow you to view that repo. You will have to set up authentication or allow anonymous to get write access in the conf file.

Thanks a lot! This helped me at least getting connected

Admitted, I am a linux NOOB, and never ever having used redmine before didn't help much.

These notes are meant as a guide for the next noob who gets stuck with the following problems :

Problem 1  : Cannot access the redmine svn-helloworld repository with tortoiseSVN

 

Problem 2 : Can access the helloworld repository but cannot commit changes with tortoiseSVN - no password dialog appears

 
solution to problem 1 :

Lets assume Your linux box is at 192.168.1.33

In tortoiseSVN use this connect string : 

svn://192.168.10.39/svn/helloworld

!!using svn://192.168.10.39/svn  as instructed in the startup screen will only bring error messages

the helloworld repository is not called svn-helloworld as one might think looking at redmne, the real repository name can be seen in the configuration part of redmine.

 

solution to problem 2 :

can access the helloworld repository but cannot commit changes with tortoiseSVN - no password dialog appears

This is because the helloworld project has not been set up with a username - no matter what You do in redmine, svn will not ask for a password and You are stuck in readonly mode.

to fix it, do the following :

log in as root with the password you set up when the box booted first time

cd /srv/repos/svn/helloworld/conf

nano svnserve.conf

In the section [general]

uncomment the following lines (by deleting the # in front of them)

anon-access=read

auth-access = write

password-db = passwd

save the file and exit (menu at the bottom of the screen ^ means CTRL+

nano passwd

add a line 

dennis = dennispassword

save, exit

This will do it! Now You can play around with the helloworld example using tortoiseSVN as a client from another computer.

The part about getting the password dialog in tortoisesvn to show was inspired by a cool dude in this post :

http://www.turnkeylinux.org/forum/support/20101013/noob-reminesvnhggit-appliance

 

Regards,

 

Dennis the linux NOOB (but not for long)

 

Now I'll try to figure how to add a new svn repository, and a new project with a user. It seems to be best to create the repository first, then the project. Repository creation seems to be something about running some script or whatever.. it's all in the forums somewhere :-)

  i

 

i wrote

svn://192.168.10.39/svn/helloworld

!!using svn://192.168.10.39/svn  as instructed in the startup screen will only bring error messages

 

That should be .33 instead of .39 of course.  not sure where that 39 came from.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)