Thread: SVN+SSH Help
hey,
i'm having issue svn+ssh:// feature on ubuntu/subversion. have bash script executed checkout repository development environment.
1. have bash script 99% working, problem cannot auotmatically login ssh instance:
i've read upon "bug" --username not being ssh username, , following works (except password)code:sudo svn checkout svn+ssh://serv.com/var/svn/repo /var/www/site.com/dev --username user --password 'test$$'
how can password automatically login (and not prompt me).code:sudo svn checkout svn+ssh://user@serv.com/var/svn/repo /var/www/site.com/dev --password 'test$$'
2. process - how executed!
-> user commits svn changes.
-> svn post-commit-hook executes /var/bin/svn_checkout (via php/cgi).
-> bash executes checkout
-> complete
3. bash script follows:
any appreciated!code:#!/bin/bash -x # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # checkout repository # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- usage() { cat << eof usage: $0 options script checkout repository development. options: -s site/repository. -u ssh username. -p ssh password. eof } if [ "$1" == "?" ]; usage exit fi # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- sh_dir_dev="/var/www/" sh_dir_svn="/var/svn/" # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- while getopts ":s:u:p:" opt; case ${opt} in s) domain_name=${optarg} ;; u) user_name=${optarg} ;; p) user_pwd=${optarg} ;; *) echo "invalid option: -${opt} ${optarg}" exit 1 ;; esac done if [[ -z "${domain_name}" ]] || [[ -z "${user_name}" ]] || [[ -z "${user_pwd}" ]]; usage exit fi if [ ! -e "${sh_dir_dev}${domain_name}" ]; echo "domain name ${domain_name} not exist, aborting." exit fi echo "checking out repository..." cmd="svn checkout --password '${user_pwd}' svn+ssh://${user_name}@server.com${sh_dir_svn}${domain_name} ${sh_dir_dev}${domain_name}/dev" eval cmd echo "updating ownership , mode..." chown -r www-data:www-data ${sh_dir_dev}${domain_name}/dev echo "clearing cache directories..." rm -fr `find ${sh_dir_dev}${domain_name}/dev -type d -name .svn`
thanks.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [SOLVED] SVN+SSH Help
Ubuntu
Comments
Post a Comment