Answer the question
In order to leave comments, you need to log in
SVN how to configure not to enter a password?
Perhaps I misunderstand the essence of SVN, but here is the scheme:
On a remote server (Debian 6.10) raised Subversion. Imported a web project there.
Now you need to work with files from home. I installed TurtoiseSVN, I do Checkout to the directory using the svn + ssh protocol, it asks for a password twice, well, God bless him. The files are uploaded to the directory. I make edits, commit changes, again asks for a password for a commit. So far it's not too annoying.
Question. And how now to upload these changes to the DocumentRoot directory of the web server?
I imagine it like this: checkout to this directory:
# svn co "svn+ssh://[email protected]/path/to/repo" .
But then again asks for the password, and twice. How to avoid it? Or maybe there are other schemes so that the committed changes are uploaded to the web server directory?
(Initially I thought to somehow do svn update to the documentroot directory with cron. Already confusion in my head. Is there a solution for this?
Answer the question
In order to leave comments, you need to log in
I use RapidSVN, I'm not familiar with the features of TortoiseSVN. The base SVN client is responsible for the connection and passwords. If everything is correct, it should store the preferred props in %AppData%\Subversion
. Perhaps there config
you need to enable the appropriate setting, like store-auth-creds = yes
. Working settings at my house...
I also think that it is not necessary to specify the username in the connection string so that it is requested and stored along with the password.
On the server, you need to make your working copy in the DocumentRoot ( svn co
), then commit in the usual order to the main repository, and on the server, do it svn up
to receive changes to the DocumentRoot.
Given that the svn repository and the web server are on the same server, you can do something like this
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /vhosts/www.example.com/public_html
DirectoryIndex index.html index.php
# Закрываем доступ к служебным папкам VCS
RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)
<Directory /vhosts/www.example.com/public_html>
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# cd /vhosts/www.example.com/public_html
# svn co file:///var/lib/svn/repos/project1/trunk ./
# chown -R svn:apache /vhosts/www.example.com/public_html
# chmod -R 770 /vhosts/www.example.com/public_html
# id svn
uid=497(svn) gid=48(apache) groups=48(apache),497(svn)
# cat /var/lib/svn/repos/project1/hooks/post-commit
#!/bin/sh
umask 002
cd /vhosts/www.example.com/public_html && svn up
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question