(please read full commit message) upgrade behaviour changed

**upgrades no longer touch the config or the keydir**

When you first install gitolite, the easy install script has to do two
*distinct* things:

  * install the software
  * create and seed the gitolite-admin repo with a minimum config file
    and the newly created pubkey

That's fine for an install, because nothing exists yet anyway.

Subsequent invocations of the script should only do the first task (so
that gitolite itself can be upgraded), and not attempt to fiddle with
the config file and pubkeys.

Unfortunately, until now I had not been separating these two activities
cleanly enough.  For instance, the commit message for 8e47e01 said:

    IMPORTANT: we assume that $admin_name remains the same in an upgrade
    -- that's how we detect it is an upgrade!  Change that name or his
    pubkey, and you're toast!

Ouch!

So now I decided to clean things up.  The "Usage" message tells you
clearly what to do for an upgrade.

Should have been like this from the beginning, but hey we got there
eventually :)

----

Code-wise, this is a major refactor of the easy install script.  It uses
an old forgotten trick to get forward refs for bash functions ;-) and in
the process cleans up the flow quite a bit.
This commit is contained in:
Sitaram Chamarty 2009-11-06 08:59:32 +05:30
parent 130478ed93
commit c4069dd85f
2 changed files with 364 additions and 248 deletions

View file

@ -16,6 +16,7 @@ In this document:
* advantages over the older install methods * advantages over the older install methods
* disadvantages * disadvantages
* manual install * manual install
* upgrades
* other notes * other notes
* next steps * next steps
@ -75,6 +76,22 @@ If you don't have bash, it's not very complicated to do it manually. Just
open the file `src/00-easy-install.sh` in a nice, syntax coloring, text open the file `src/00-easy-install.sh` in a nice, syntax coloring, text
editor, and follow the instructions marked "MANUAL" :-) editor, and follow the instructions marked "MANUAL" :-)
### upgrades
Upgrading gitolite is easy.
To upgrade, pull the latest "master" (or other) branch in your gitolite repo
clone, then run the same exact command you ran to do the install, except you
can leave out the last argument.
And you might want to add a `-q` to speed things up :-)
Note that this only upgrades the software. Unlike earlier versions, it does
**not** touch the `conf/gitolite.conf` file or the contents of `keydir` in any
way. I decided that it is not possible to **safely** let an upgrade do
something meaningful with them -- fiddling with existing config files (as
opposed to merely creating one which did not exist) is best left to a human.
### other notes ### other notes
* if you run `src/00-easy-install.sh` without the `-q` option, you will be * if you run `src/00-easy-install.sh` without the `-q` option, you will be

View file

@ -16,31 +16,82 @@
set -e set -e
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# temp files # bootstrap and main
# ----------------------------------------------------------------------
if [[ $1 != boot/strap ]]
then
# did someone tell you you can't call functions before they're defined in
# bash? Don't believe everything you hear ;-)
. $0 boot/strap
main "$@"
cleanup
exit 0
fi
# ----------------------------------------------------------------------
# no direct executable statements after this; only functions
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
main() {
setup_tempdir
basic_sanity "$@"
version_info "$@"
[[ -n $admin_name ]] && setup_local_ssh
copy_gl # src, conf, etc
run_install
[[ $upgrade == 1 ]] && {
# just compile it, in case the config file's internal format has
# changed and the hooks expect something different
ssh -p $port $user@$host "cd $GL_ADMINDIR; src/gl-compile-conf $quiet"
eval "echo \"$v_done\""
cleanup
exit 0
}
initial_conf_key
setup_pta
}
# ----------------------------------------------------------------------
# setup temp files
# ----------------------------------------------------------------------
setup_tempdir() {
export tmpgli=tmp-gl-install export tmpgli=tmp-gl-install
trap "rm -rf $tmpgli" 0 trap cleanup 0
mkdir -p $tmpgli mkdir -p $tmpgli
}
cleanup() {
rm -rf $tmpgli
}
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# service functions # service functions
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
die() { echo "$@"; echo; echo "run $0 again without any arguments for help and tips"; exit 1; } die() { echo "$@"; echo; echo "run $0 without any arguments for help and tips"; cleanup; exit 1; }
prompt() { prompt() {
# receives two arguments. A short piece of text to be displayed, without # receives two arguments. A short piece of text to be displayed, without
# pausing, in "quiet" mode, and a much longer one to be displayed, *with* # pausing, in "quiet" mode, and a much longer one to be displayed, *with*
# a pause, in normal (verbose) mode # a pause, in normal (verbose) mode
[[ $quiet == -q ]] && [[ -n $1 ]] && { [[ $quiet == -q ]] && [[ -n $1 ]] && {
echo "$1" eval "echo \"$1\""
return return
} }
shift shift
echo echo
echo echo
echo ------------------------------------------------------------------------ echo ------------------------------------------------------------------------
echo " $1" eval "echo \"$1\""
echo echo
read -p '...press enter to continue or Ctrl-C to bail out' read -p '...press enter to continue or Ctrl-C to bail out'
} }
@ -55,7 +106,8 @@ Usage: $0 [-q] user host [port] admin_name # install
- "host" is that server's hostname (or IP address) - "host" is that server's hostname (or IP address)
- "port" is the ssh server port on "host"; optional, defaults to 22 - "port" is the ssh server port on "host"; optional, defaults to 22
- "admin_name" is *your* name as it should appear in the eventual gitolite - "admin_name" is *your* name as it should appear in the eventual gitolite
config file (not needed/used for upgrades) config file. For upgrades (ie., gitolite is already installed on the
server), this argument is not needed, and will be *ignored* if provided.
Example usage: $0 git my.git.server sitaram Example usage: $0 git my.git.server sitaram
@ -84,14 +136,14 @@ EOFU
# basic sanity / argument checks # basic sanity / argument checks
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# MANUAL: this *must* be run as "src/00-easy-install.sh", not by cd-ing to src basic_sanity() {
# and then running "./00-easy-install.sh" # MANUAL: this *must* be run as "src/00-easy-install.sh", not by cd-ing to
# src and then running "./00-easy-install.sh"
[[ $0 =~ ^src/00-easy-install.sh$ ]] || [[ $0 =~ ^src/00-easy-install.sh$ ]] ||
{ {
echo "please cd to the gitolite repo top level directory and run this as die "please cd to the gitolite repo top level directory and run this as
'src/00-easy-install.sh'" 'src/00-easy-install.sh'"
exit 1;
} }
# are we in quiet mode? # are we in quiet mode?
@ -109,8 +161,8 @@ user=$1
host=$2 host=$2
port=22 port=22
admin_name=$3 admin_name=$3
# but if the 3rd arg is a number, that's a port number, and the 4th arg is the # but if the 3rd arg is a number, that's a port number, and the 4th arg is
# admin_name # the admin_name
if [[ $3 =~ ^[0-9]+$ ]] if [[ $3 =~ ^[0-9]+$ ]]
then then
port=$3 port=$3
@ -131,17 +183,20 @@ ls src/gl-auth-command \
conf/example.gitolite.rc >/dev/null || conf/example.gitolite.rc >/dev/null ||
die "cant find at least some files in gitolite sources/config; aborting" die "cant find at least some files in gitolite sources/config; aborting"
# MANUAL: make sure you have password-less (pubkey) auth on the server. That # MANUAL: make sure you have password-less (pubkey) auth on the server.
# is, running "ssh git@server" should log in straight away, without asking for # That is, running "ssh git@server" should log in straight away, without
# a password # asking for a password
ssh -p $port -o PasswordAuthentication=no $user@$host true || ssh -p $port -o PasswordAuthentication=no $user@$host true ||
die "pubkey access didn't work; please set it up using 'ssh-copy-id' or something" die "pubkey access didn't work; please set it up using 'ssh-copy-id' or something"
}
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# version info # version info
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
version_info() {
# MANUAL: if needed, make a note of the version you are upgrading from, and to # MANUAL: if needed, make a note of the version you are upgrading from, and to
# record which version is being sent across; we assume it's HEAD # record which version is being sent across; we assume it's HEAD
@ -152,48 +207,25 @@ export upgrade_details="you are upgrading from \
$(ssh -p $port $user@$host cat gitolite-install/src/VERSION 2>/dev/null || echo '(unknown)' ) \ $(ssh -p $port $user@$host cat gitolite-install/src/VERSION 2>/dev/null || echo '(unknown)' ) \
to $(cat src/VERSION)" to $(cat src/VERSION)"
prompt "$upgrade_details" \ prompt "$upgrade_details" "$v_upgrade_details"
"$upgrade_details }
Note: getting '(unknown)' for the 'from' version should only happen once.
Getting '(unknown)' for the 'to' version means you are probably installing
from a tar file dump, not a real clone. This is not an error but it's
nice to have those version numbers in case you need support. Try and
install from a clone"
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# new keypair, ssh-config para; only on "install" (not upgrade) # new keypair, ssh-config para; only on "install" (not upgrade)
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
[[ -n $admin_name ]] && { setup_local_ssh() {
# MANUAL: create a new key for you as a "gitolite user" (as opposed to you # MANUAL: create a new key for you as a "gitolite user" (as opposed to you
# as the "gitolite admin" who needs to login to the server and get a # as the "gitolite admin" who needs to login to the server and get a
# command line). For example, "ssh-keygen -t rsa ~/.ssh/sitaram"; this # command line). For example, "ssh-keygen -t rsa ~/.ssh/sitaram"; this
# would create two files in ~/.ssh (sitaram and sitaram.pub) # would create two files in ~/.ssh (sitaram and sitaram.pub)
prompt "setting up keypair..." \ prompt "setting up keypair..." "$v_setting_up_keypair"
"the next command will create a new keypair for your gitolite access
The pubkey will be $HOME/.ssh/$admin_name.pub. You will have to choose a
passphrase or hit enter for none. I recommend not having a passphrase for
now, *especially* if you do not have a passphrase for the key which you
are already using to get server access!
Add one using 'ssh-keygen -p' after all the setup is done and you've
successfully cloned and pushed the gitolite-admin repo. After that,
install 'keychain' or something similar, and add the following command to
your bashrc (since this is a non-default key)
ssh-add \$HOME/.ssh/$admin_name
This makes using passphrases very convenient."
if [[ -f $HOME/.ssh/$admin_name.pub ]] if [[ -f $HOME/.ssh/$admin_name.pub ]]
then then
prompt " ...reusing $HOME/.ssh/$admin_name.pub..." \ prompt " ...reusing $HOME/.ssh/$admin_name.pub..." "$v_reuse_pubkey"
"Hmmm... pubkey $HOME/.ssh/$admin_name.pub exists; should I just re-use it?
Be sure you remember the passphrase, if you gave one when you created it!"
else else
ssh-keygen -t rsa -f $HOME/.ssh/$admin_name || die "ssh-keygen failed for some reason..." ssh-keygen -t rsa -f $HOME/.ssh/$admin_name || die "ssh-keygen failed for some reason..."
fi fi
@ -210,12 +242,7 @@ prompt "$upgrade_details" \
if ssh-add -l &>/dev/null if ssh-add -l &>/dev/null
then then
prompt " ...adding key to agent..." \ prompt " ...adding key to agent..." "$v_ssh_add"
"you're running ssh-agent. We'll try and do an ssh-add of the
private key we just created, otherwise this key won't get picked up. If
you specified a passphrase in the previous step, you'll get asked for one
now -- type in the same one."
ssh-add $HOME/.ssh/$admin_name ssh-add $HOME/.ssh/$admin_name
fi fi
@ -231,8 +258,7 @@ prompt "$upgrade_details" \
# port 22 # port 22
# identityfile ~/.ssh/sitaram # identityfile ~/.ssh/sitaram
echo " echo "host gitolite
host gitolite
user $user user $user
hostname $host hostname $host
port $port port $port
@ -240,21 +266,9 @@ host gitolite
if grep 'host *gitolite' $HOME/.ssh/config &>/dev/null if grep 'host *gitolite' $HOME/.ssh/config &>/dev/null
then then
prompt "found gitolite para in ~/.ssh/config; assuming it is correct..." \ prompt "found gitolite para in ~/.ssh/config; assuming it is correct..." "$v_found_para"
"your \$HOME/.ssh/config already has settings for gitolite. I will
assume they're correct, but if they're not, please edit that file, delete
that paragraph (that line and the following few lines), Ctrl-C, and rerun.
In case you want to check right now (from another terminal) if they're
correct, here's what they are *supposed* to look like:
$(cat $tmpgli/.gl-stanza)"
else else
prompt "creating gitolite para in ~/.ssh/config..." \ prompt "creating gitolite para in ~/.ssh/config..." "$v_creating_para"
"creating settings for your gitolite access in $HOME/.ssh/config;
these are the lines that will be appended to your ~/.ssh/config:
$(cat $tmpgli/.gl-stanza)"
cat $tmpgli/.gl-stanza >> $HOME/.ssh/config cat $tmpgli/.gl-stanza >> $HOME/.ssh/config
# if the file didn't exist at all, it might have the wrong permissions # if the file didn't exist at all, it might have the wrong permissions
chmod 644 $HOME/.ssh/config chmod 644 $HOME/.ssh/config
@ -265,6 +279,8 @@ host gitolite
# server side # server side
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
copy_gl() {
# MANUAL: copy the gitolite directories "src", "conf", and "doc" to the # MANUAL: copy the gitolite directories "src", "conf", and "doc" to the
# server, to a directory called (for example) "gitolite-install". You may # server, to a directory called (for example) "gitolite-install". You may
# have to create the directory first. # have to create the directory first.
@ -273,24 +289,16 @@ ssh -p $port $user@$host mkdir -p gitolite-install
rsync $quiet -e "ssh -p $port" -a src conf doc $user@$host:gitolite-install/ rsync $quiet -e "ssh -p $port" -a src conf doc $user@$host:gitolite-install/
rm -f src/VERSION rm -f src/VERSION
# MANUAL: now log on to the server (ssh git@server) and get a command line. # MANUAL: now log on to the server (ssh git@server) and get a command
# This step is for your convenience; the script does it all from the client # line. This step is for your convenience; the script does it all from
# side but that may be too much typing for manual use ;-) # the client side but that may be too much typing for manual use ;-)
# MANUAL: cd to the "gitolite-install" directory where the sources are. Then # MANUAL: cd to the "gitolite-install" directory where the sources are.
# copy conf/example.gitolite.rc as ~/.gitolite.rc and edit it if you wish to # Then copy conf/example.gitolite.rc as ~/.gitolite.rc and edit it if you
# change any paths. Make a note of the GL_ADMINDIR and REPO_BASE paths; you # wish to change any paths. Make a note of the GL_ADMINDIR and REPO_BASE
# will need them later # paths; you will need them later
prompt "finding/creating gitolite rc..." \ prompt "finding/creating gitolite rc..." "$v_edit_glrc"
"the gitolite rc file needs to be edited by hand. The defaults
are sensible, so if you wish, you can just exit the editor.
Otherwise, make any changes you wish and save it. Read the comments to
understand what is what -- the rc file's documentation is inline.
Please remember this file will actually be copied to the server, and that
all the paths etc. represent paths on the server!"
# lets try and get the file from there first # lets try and get the file from there first
if scp -P $port $user@$host:.gitolite.rc $tmpgli &>/dev/null if scp -P $port $user@$host:.gitolite.rc $tmpgli &>/dev/null
@ -308,23 +316,7 @@ then
# manually make sure your final ~/.gitolite.rc has both your existing # manually make sure your final ~/.gitolite.rc has both your existing
# customisations as well as any new variables that the new version of # customisations as well as any new variables that the new version of
# gitolite has introduced # gitolite has introduced
prompt "" \ prompt "" "$v_upgrade_glrc"
" looks like you're upgrading, and there are some new rc variables
that this version is expecting that your old rc file doesn't have.
I'm going to run your editor with two filenames. The first is the
example file from this gitolite version. It will have a block (code
and comments) for each of the variables shown above with a '+' sign.
The second is your current rc file, the destination. Copy those lines
into this file, preferably *with* the surrounding comments (for
clarity) and save it.
This is necessary; please dont skip this!
[It's upto you to figure out how your editor handles 2 filename
arguments, switch between them, copy lines, etc ;-)]"
${VISUAL:-${EDITOR:-vi}} conf/example.gitolite.rc $tmpgli/.gitolite.rc ${VISUAL:-${EDITOR:-vi}} conf/example.gitolite.rc $tmpgli/.gitolite.rc
fi fi
else else
@ -334,26 +326,26 @@ fi
# copy the rc across # copy the rc across
scp $quiet -P $port $tmpgli/.gitolite.rc $user@$host: scp $quiet -P $port $tmpgli/.gitolite.rc $user@$host:
}
prompt "installing/upgrading..." \ run_install() {
"ignore any 'please edit this file' or 'run this command' type
lines in the next set of command outputs coming up. They're only relevant prompt "installing/upgrading..." "$v_ignore_stuff"
for a manual install, not this one..."
# extract the GL_ADMINDIR and REPO_BASE locations # extract the GL_ADMINDIR and REPO_BASE locations
GL_ADMINDIR=$(ssh -p $port $user@$host "perl -e 'do \".gitolite.rc\"; print \$GL_ADMINDIR'") GL_ADMINDIR=$(ssh -p $port $user@$host "perl -e 'do \".gitolite.rc\"; print \$GL_ADMINDIR'")
REPO_BASE=$( ssh -p $port $user@$host "perl -e 'do \".gitolite.rc\"; print \$REPO_BASE'") REPO_BASE=$( ssh -p $port $user@$host "perl -e 'do \".gitolite.rc\"; print \$REPO_BASE'")
# determine if this is an upgrade; we decide based on whether a file called # determine if this is an upgrade; we decide based on whether a file
# $GL_ADMINDIR/conf/gitolite.conf exists on the remote side. We can't do this # called $GL_ADMINDIR/conf/gitolite.conf exists on the remote side. We
# till we know the correct value for GL_ADMINDIR # can't do this till we know the correct value for GL_ADMINDIR
upgrade=0 upgrade=0
if ssh -p $port $user@$host cat $GL_ADMINDIR/conf/gitolite.conf &> /dev/null if ssh -p $port $user@$host cat $GL_ADMINDIR/conf/gitolite.conf &> /dev/null
then then
upgrade=1 upgrade=1
[[ -n $admin_name ]] && echo "looks like an upgrade... not using new key '$admin_name' after all!" [[ -n $admin_name ]] && echo -e "\n *** WARNING ***: looks like an upgrade... ignoring argument '$admin_name'"
else else
[[ -z $admin_name ]] && die "this doesn't look like an upgrade... I need a name for the admin" [[ -z $admin_name ]] && die " *** ERROR ***: doesn't look like an upgrade, so I need a name for the admin"
fi fi
# MANUAL: still in the "gitolite-install" directory? Good. Run # MANUAL: still in the "gitolite-install" directory? Good. Run
@ -361,22 +353,9 @@ fi
ssh -p $port $user@$host "cd gitolite-install; src/install.pl $quiet" ssh -p $port $user@$host "cd gitolite-install; src/install.pl $quiet"
# MANUAL: if you're upgrading, run "src/gl-compile-conf" and you're done! -- # MANUAL: if you're upgrading, run "src/gl-compile-conf" and you're done!
# ignore the rest of this file for the purposes of an upgrade # -- ignore the rest of this file for the purposes of an upgrade
[[ $upgrade == 1 ]] && {
# just compile it, in case the config file's internal format has changed
# and the hooks expect something different
ssh -p $port $user@$host "cd $GL_ADMINDIR; src/gl-compile-conf $quiet"
prompt "" "done!
If you forgot the help message you saw when you first ran this, there's a
somewhat generic version of it at the end of this file. Try:
tail -30 $0
"
exit 0
} }
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
@ -389,6 +368,7 @@ ssh -p $port $user@$host "cd gitolite-install; src/install.pl $quiet"
# repo gitolite-admin # repo gitolite-admin
# RW+ = sitaram # RW+ = sitaram
initial_conf_key() {
echo "#gitolite conf echo "#gitolite conf
# please see conf/example.conf for details on syntax and features # please see conf/example.conf for details on syntax and features
@ -406,14 +386,17 @@ scp $quiet -P $port $HOME/.ssh/$admin_name.pub $user@$host:$GL_ADMINDIR/keydir
# MANUAL: cd to $GL_ADMINDIR and run "src/gl-compile-conf" # MANUAL: cd to $GL_ADMINDIR and run "src/gl-compile-conf"
ssh -p $port $user@$host "cd $GL_ADMINDIR; src/gl-compile-conf $quiet" ssh -p $port $user@$host "cd $GL_ADMINDIR; src/gl-compile-conf $quiet"
}
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# hey lets go the whole hog on this; setup push-to-admin! # hey lets go the whole hog on this; setup push-to-admin!
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# MANUAL: you have to now make the first commit in the admin repo. This is setup_pta() {
# a little more complex, so read carefully and substitute the correct paths.
# What you have to do is: # MANUAL: you have to now make the first commit in the admin repo. This
# is a little more complex, so read carefully and substitute the correct
# paths. What you have to do is:
# cd $REPO_BASE/gitolite-admin.git # cd $REPO_BASE/gitolite-admin.git
# GIT_WORK_TREE=$GL_ADMINDIR git add conf/gitolite.conf keydir # GIT_WORK_TREE=$GL_ADMINDIR git add conf/gitolite.conf keydir
@ -433,15 +416,14 @@ GIT_WORK_TREE=$GL_ADMINDIR git commit -am start --allow-empty
ssh -p $port $user@$host "cd gitolite-install; src/install.pl $quiet" ssh -p $port $user@$host "cd gitolite-install; src/install.pl $quiet"
# MANUAL: you're done! Log out of the server, come back to your workstation, # MANUAL: you're done! Log out of the server, come back to your
# and clone the admin repo using "git clone gitolite:gitolite-admin.git", or # workstation, and clone the admin repo using "git clone
# pull once again if you already have a clone # gitolite:gitolite-admin.git", or pull once again if you already have a
# clone
prompt "cloning gitolite-admin repo..." \ prompt "cloning gitolite-admin repo..." "$v_cloning"
"now we will clone the gitolite-admin repo to your workstation
and see if it all hangs together. We'll do this in your \$HOME for now,
and you can move it elsewhere later if you wish to."
cleanup
cd $HOME cd $HOME
git clone gitolite:gitolite-admin.git git clone gitolite:gitolite-admin.git
@ -449,8 +431,125 @@ git clone gitolite:gitolite-admin.git
echo echo
echo echo
echo ------------------------------------------------------------------------ echo ---------------------------------------------------------------
echo " eval "echo \"$tail\""
}
# ----------------------------------------------------------------------
# prompt strings
# ----------------------------------------------------------------------
v_upgrade_details="
\$upgrade_details
Note: getting '(unknown)' for the 'from' version should only happen once.
Getting '(unknown)' for the 'to' version means you are probably installing
from a tar file dump, not a real clone. This is not an error but it's nice to
have those version numbers in case you need support. Try and install from a
clone
"
v_setting_up_keypair="
the next command will create a new keypair for your gitolite access
The pubkey will be \$HOME/.ssh/\$admin_name.pub. You will have to choose a
passphrase or hit enter for none. I recommend not having a passphrase for
now, *especially* if you do not have a passphrase for the key which you are
already using to get server access!
Add one using 'ssh-keygen -p' after all the setup is done and you've
successfully cloned and pushed the gitolite-admin repo. After that, install
'keychain' or something similar, and add the following command to your bashrc
(since this is a non-default key)
ssh-add \\\$HOME/.ssh/\$admin_name
This makes using passphrases very convenient.
"
v_reuse_pubkey="
Hmmm... pubkey \$HOME/.ssh/\$admin_name.pub exists; should I just re-use it?
Be sure you remember the passphrase, if you gave one when you created it!
"
v_ssh_add="
you're running ssh-agent. We'll try and do an ssh-add of the
private key we just created, otherwise this key won't get picked up. If
you specified a passphrase in the previous step, you'll get asked for one
now -- type in the same one.
"
v_found_para="
your \\\$HOME/.ssh/config already has settings for gitolite. I will assume
they're correct, but if they're not, please edit that file, delete that
paragraph (that line and the following few lines), Ctrl-C, and rerun.
In case you want to check right now (from another terminal) if they're
correct, here's what they are *supposed* to look like:
\$(cat \$tmpgli/.gl-stanza)
"
v_creating_para="
creating settings for your gitolite access in \$HOME/.ssh/config;
these are the lines that will be appended to your ~/.ssh/config:
\$(cat \$tmpgli/.gl-stanza)
"
v_edit_glrc="
the gitolite rc file needs to be edited by hand. The defaults are sensible,
so if you wish, you can just exit the editor.
Otherwise, make any changes you wish and save it. Read the comments to
understand what is what -- the rc file's documentation is inline.
Please remember this file will actually be copied to the server, and that all
the paths etc. represent paths on the server!
"
v_upgrade_glrc="
looks like you're upgrading, and there are some new rc variables that this
version is expecting that your old rc file doesn't have.
I'm going to run your editor with two filenames. The first is the example
file from this gitolite version. It will have a block (code and comments) for
each of the variables shown above with a '+' sign.
The second is your current rc file, the destination. Copy those lines into
this file, preferably *with* the surrounding comments (for clarity) and save
it.
This is necessary; please dont skip this!
[It's upto you to figure out how your editor handles 2 filename arguments,
switch between them, copy lines, etc ;-)]
"
v_ignore_stuff="
ignore any 'please edit this file' or 'run this command' type lines in the
next set of command outputs coming up. They're only relevant for a manual
install, not this one...
"
v_done="
done!
If you forgot the help message you saw when you first ran this, there's a
somewhat generic version of it at the end of this file. Try:
tail -31 \$0
"
v_cloning="
now we will clone the gitolite-admin repo to your workstation and see if it
all hangs together. We'll do this in your \\\$HOME for now, and you can move
it elsewhere later if you wish to.
"
tail="
All done! All done!
The admin repo is currently cloned at ~/gitolite-admin; you can clone it The admin repo is currently cloned at ~/gitolite-admin; you can clone it
@ -472,7 +571,7 @@ hosting your gitolite setup -- one to get you a command line, and one to get
you gitolite access; see doc/6-ssh-troubleshooting.mkd. If you're not using you gitolite access; see doc/6-ssh-troubleshooting.mkd. If you're not using
keychain or some such software, you may have to run this each time you log in: keychain or some such software, you may have to run this each time you log in:
ssh-add ~/.ssh/$admin_name ssh-add ~/.ssh/\$admin_name
URLS: *Your* URL for cloning any repo on this server will be URLS: *Your* URL for cloning any repo on this server will be
@ -480,5 +579,5 @@ URLS: *Your* URL for cloning any repo on this server will be
*Other* users you set up will have to use *Other* users you set up will have to use
$user@$host:reponame.git \$user@\$host:reponame.git
" "