]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
new command ./all keygen to create a SSH key and explain how to get git push access
authorRudolf Polzer <divverent@alientrap.org>
Sat, 16 Oct 2010 09:27:14 +0000 (11:27 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 16 Oct 2010 09:27:14 +0000 (11:27 +0200)
all

diff --git a/all b/all
index f7e1c97b4ba5a8a77d97052ba65c5e6fa6efcfcb..96cd3b5b05ac8c45a92f95491036ea1772004cc6 100755 (executable)
--- a/all
+++ b/all
@@ -349,6 +349,50 @@ case "$cmd" in
                        fi
                done
                ;;
                        fi
                done
                ;;
+       keygen)
+               # enable the ssh URL for pushing
+               "$SELF" update -N -p
+
+               if [ -f ~/.ssh/id_rsa.pub ]; then
+                       msg ""
+                       msg "A key already exists and no new one will be generated. If you"
+                       msg "already have done the procedure for getting your key approved, you"
+                       msg "can skip the following paragraph and already use the repository."
+                       msg ""
+                       msg "To get access, your key has to be approved first. For that, visit"
+                       msg "http://dev.xonotic.org/, then log in, create a \"New Issue\" on"
+                       msg "the \"Support\" tracker in the \"Repository\" category where you"
+                       msg "apply for access and paste the following output into the ticket:"
+                       msg ""
+                       msg "`cat ~/.ssh/id_rsa.pub`"
+               elif [ -f ~/.ssh/id_dsa.pub ]; then
+                       msg ""
+                       msg "A key already exists and no new one will be generated. If you"
+                       msg "already have done the procedure for getting your key approved, you"
+                       msg "can skip the following paragraph and already use the repository."
+                       msg ""
+                       msg "To get access, your key has to be approved first. For that, visit"
+                       msg "http://dev.xonotic.org/, then log in, create a \"New Issue\" on"
+                       msg "the \"Support\" tracker in the \"Repository\" category where you"
+                       msg "apply for access and paste the following output into the ticket:"
+                       msg ""
+                       msg "`cat ~/.ssh/id_dsa.pub`"
+               else
+                       msg ""
+                       msg "No key has been generated yet. One will be generated now."
+                       msg "If other people are using your computer, it is recommended"
+                       msg "to specify a passphrase."
+                       msg ""
+                       ssh-keygen -t rsa -b 4096
+                       msg ""
+                       msg "To get access, your key has to be approved first. For that, visit"
+                       msg "http://dev.xonotic.org/, then log in, create a \"New Issue\" on"
+                       msg "the \"Support\" tracker in the \"Repository\" category where you"
+                       msg "apply for access and paste the following output into the ticket:"
+                       msg ""
+                       msg "`cat ~/.ssh/id_rsa.pub`"
+               fi
+               ;;
        update|pull)
                allow_pull=true
                fix_config=false
        update|pull)
                allow_pull=true
                fix_config=false
@@ -357,7 +401,9 @@ case "$cmd" in
                                allow_pull=false
                        elif [ x"$1" = x"-p" ]; then
                                fix_config=true
                                allow_pull=false
                        elif [ x"$1" = x"-p" ]; then
                                fix_config=true
-                               pushbase=ssh://xonotic@git.xonotic.org/
+                               if [ x"$base" != x"ssh://xonotic@git.xonotic.org/" ]; then
+                                       pushbase=ssh://xonotic@git.xonotic.org/
+                               fi
                        elif [ x"$1" = x"-s" ]; then
                                fix_config=true
                                base=ssh://xonotic@git.xonotic.org/
                        elif [ x"$1" = x"-s" ]; then
                                fix_config=true
                                base=ssh://xonotic@git.xonotic.org/