More fiddling with the SSH keys.

This commit is contained in:
Jorrit Wronski
2014-12-08 10:28:57 +01:00
parent 9e9ddd4a44
commit 2973ef8ff3
2 changed files with 6 additions and 13 deletions

View File

@@ -4,11 +4,9 @@
USER=coolprop
source /home/$USER/.bash_profile
#
SFPASS="/home/$USER/etc_opt/id_jorritw"
#
FOLDER="/home/$USER/src/CoolProp.git"
ORIGIN="https://github.com/CoolProp/CoolProp.git"
MIRROR="ssh://jorritw@git.code.sf.net/p/coolprop/git"
MIRROR="ssh://git.code.sf.net-jorritw/p/coolprop/git"
#
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
BASEFOLDER=${FOLDER%/*}
@@ -21,11 +19,8 @@ if [ ! -d $FOLDER ]; then # repo does not exist, clone it
#popd
popd
fi
echo "Preparing the ssh key for SourceForge"
eval $(ssh-agent) # Make sure ssh-agent is running
ssh-add "$SFPASS"
pushd $FOLDER
#git push --force --mirror
git push --mirror $MIRROR
git fetch $ORIGIN
git push --force --mirror $MIRROR
popd
exit 0