Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Littleodie914

macrumors 68000
Original poster
Jun 9, 2004
1,813
8
Rochester, NY
Hey MR dudes and dudettes, here's the ideal situation I'm looking to achieve:

We're starting a Team Software project at school, and I'd like to setup an SVN repository on the server that myself and my other teammates can get to, but I want to be able to set it up so they can (obviously) get to the SVN, but to none of my other files.

I tried creating a "teamsoftware" user, and it created the home directory:

/home/teamsoftware/

Which is good. But then, I can't figure out how to SVN *to* the repo. Since I can't give them SSH access, as only one SSH account is active for my site and it's my main administrator login, and FTP access doesn't seem to be getting me anywhere, (I keep getting weird undefined tunnel scheme errors, in both the terminal and in Eclipse) I was wondering if you guys had any suggestions.

Thanks! :D
 
Just create a new repo in the user dir with "svnadmin create folder_name".

Then you can check it out with "svn co svn+ssh://teamsoftware@host.name.com/home/teamsoftware/folder_name local_folder"
 
Ah, that was close, but now I keep getting a permission denied. :(

On my cPanel settings it gives me the following information:

FTP Username: teamsoftware@craigotis.com
FTP Server: ftp.craigotis.com
FTP Server Port: 21
SFTP Server Port: 22

So I can only assume that the address would be:

svn co svn+ssh://teamsoftware@craigotis.com@ftp.craigotis.com/home/teamsoftware/svn/repo/

Right? I tried it that way and then just "teamsoftware" for the username and both times I get denied. (even though I just double checked the password)
 
hm.. the @ in the username may pose a problem..

you could always try with teamsoftware\@craigotis.com and see if that helps..
Hmm nope, same problem. :( Permission denied must mean there's a user/password issue right? If it was an actual "permissions" problem or if any types of connections were blocked then the error message would say so.
 
You should probably try to do a "ssh teamsoftware\@craigotis.com@ftp.craigotis.com" to verify that you're actually able to make a ssh connection.

If that is so, there's probably something wrong with either a path, or filepermissions
 
You should probably try to do a "ssh teamsoftware\@craigotis.com@ftp.craigotis.com" to verify that you're actually able to make a ssh connection.

If that is so, there's probably something wrong with either a path, or filepermissions

Nope, I still get denied. I'm pretty sure that the reason it's still getting kicked off is because it's strictly an FTP account, not an SSH account. Does that make sense?
 
Kinda..

SFTP is more or less file transfer over SSH, so one should still have ssh access, only might be with a very limited shell.

If you're unable to make a connection over ssh, you will not be able to do svn over ssh either though, and should probably hear with your service provider if they are able to provide you with any ways to do so.
 
I guess it, in technical terms, would be possible, but you still need protocol support in the svn tools.

I can't say I've heard of any way to do this purely over FTP, but as far as I can tell, with SFTP you should be able to.
 
Code:
craig-otiss-imac:~ Craig$ svn co svn+sftp://teamsoftware@craigotis.com@ftp.craigotis.com/home/teamsoftware/svn/repo/
svn: Undefined tunnel scheme 'sftp'
I've never had this much trouble with SVN before, but I guess until this point I've always been using SSH. :confused:
 
Hehe.. I should probably been more clear as for what I meant by SFTP.

Usually SFTP just means some sort of transfer of files over SSH, and is therefor not a protocol in its own. It should still be "svn+ssh".
 
I've never seen svn over ftp myself.

But getting back to the original issue, if you can't ssh into this box, then you definitely won't be able to do svn+ssh.

So I would focus on solving the ssh problem first. At first you said your host does allow ssh right? For this one account?
 
I've never seen svn over ftp myself.

But getting back to the original issue, if you can't ssh into this box, then you definitely won't be able to do svn+ssh.

So I would focus on solving the ssh problem first. At first you said your host does allow ssh right? For this one account?
Right, the host does allow SSH, but only for my personal account, and it's granted access to everything on the site. So that definitely isn't an option, but it lets you make FTP accounts, so I thought that that might be the way to go.

Any way to do SVN over FTP? Or other solutions anyone can think of?
 
Right, the host does allow SSH, but only for my personal account, and it's granted access to everything on the site. So that definitely isn't an option, but it lets you make FTP accounts, so I thought that that might be the way to go.

Any way to do SVN over FTP? Or other solutions anyone can think of?

Do these FTP accounts exist as real OS level users on the server? Or are they just "virtual" accounts?

If they are real accounts, then you could try the trick for multiple users sharing one account in the svn manual under "SSH configuration tricks".

http://svnbook.red-bean.com/en/1.4/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth
 
If you have SSH account access enabled, then it should be a simple case of opening Terminal.app and doing:
Code:
ssh username@domain.name
If this doesn't work, the create at ticket at ASO. They are very helpful.

Forget about FTP, you don't need it for what you're trying to achieve.

So you're going to use svn over ssh. The trouble that you are going to have is that (unless things have changed at ASO), svnserve is not in the path of the account that logs in over ssh. You can test this. You'll need to make sure that ssh access is working. Then you'd just run:
Code:
ssh username@domain.name svnserve --version
If this works, then you are set. Otherwise you'll need to check the ASO forums to figure out how to get svnserve to be in the path. You'll need to check the ASO forums to find out what the solutions are available to this problem.

It's all a bit of a hassle really. It's much easy to setup a Google Code account or get yourself a VPS.
 
Well that's the problem, SSH isn't enabled for my "teamsoftware" user. Only FTP access. Logging in over SSH is fine with my admin account, but doing so with my teamsoftware name is denied every time. :(

So I really need some way to get SVN to work over FTP.
 
Agree that tech support at ASO are very helpful. Just open a ticket like the earlier poster suggested. You'll have this sorted in no time.
 
So I really need some way to get SVN to work over FTP.
I'm afraid that's not possible. Forget about FTP. FTP is a protocol for transferring files. SSH allows you to login into to remote servers. FTP and SSH are completely different protocols for completely different purposes. The fact that you've created a 'teamsoftware' ftp account means that the 'teamsoftware' user can login to your ftp server, nothing more.

svn+ssh will not work either unless you're happy give other people access to your admin ssh account.

I'd suggest that you read this chapter on user management:
http://svnbook.red-bean.com/en/1.0/ch06s03.html

You can quickly create an svn server by doing this:
Code:
ssh account@yourdomain.com
svnadmin create test
svnserve -d -r test

Then to see if it works, on your local machine you can try running:
Code:
svn ls svn://yourdomain.com/

Now edit the svnserve settings:
Code:
ssh user@domain.com
vi test/conf/svnserve.conf

Change svnserve.conf to look something like:
Code:
[general]
anon-access = none
auth-access = write
password-db = passwd

Then save your changes and then:
Code:
vi test/conf/passwd

It should look something like:
Code:
[users]
teamsoftware = password

Voila!
 
Ah! Thank you so much stomer, I think that's exactly what I'm looking for. The only problem now is specifying the username at the command line, when checking out. If I just use:

Code:
svn ls svn://craigotis.com

Then it automatically attempts to connect using my iMac's username. Is there a way to say that you want to login as teamsoftware?

Thanks again! :D

Edit: Scratch that... Eclipse asks for a username and password anyway, so it should be all set, I'll get back to you!

Edit 2: I seem to be having authentication issues. In Eclipse, I'm using just:

svn://craigotis.com

And then the user/pass box pops up, and I type in "teamsoftware" for the username, and the password.

My passwd config file looks like:

[users]
teamsoftware = passwd

And my svnserve.conf has the three lines (anon, auth, and password-db) un-commented.
 
Hmm, now I'm getting downright denied:

Code:
craig-otiss-imac:~ Craig$ svn ls --username teamsoftware svn://craigotis.com
svn: Can't connect to host 'craigotis.com': Connection refused

What method does that use to connect? I can't think of any reason why it would being rejected that quickly, SSH, HTTP, and FTP are all open, so I don't know what type of connection it is that it's being blocked.
 
What method does that use to connect? I can't think of any reason why it would being rejected that quickly, SSH, HTTP, and FTP are all open, so I don't know what type of connection it is that it's being blocked.
That error could be one of two things:

1. Your svn server's not running.
2. Port 3690 on your server is being blocked

You can check that svnserve is still running by logging in via ssh and typing
Code:
ps -ef | grep svnserve
You should see something like:
Code:
admin   29082     1  0 08:33 ?        00:00:00 svnserve -d -r myrepo
admin   29163 28940  0 08:33 ?        00:00:00 grep svnserve
If you don't see any 'svnserve -d -r myrepo', then svnserve isn't running.

I think you'll need to raise a support ticket with ASO if port 3690 is actually blocked.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.