put back USER for local & remote

This commit is contained in:
Trevor Batley 2023-05-10 13:04:48 +10:00
parent 43c60bac5d
commit c58aec524d
2 changed files with 5 additions and 2 deletions

5
config
View File

@ -1,12 +1,15 @@
[smegit]
DEBUG=false
WORKDIR=/smegit
# if first character ~ will be relative to users home, otherwise absolute
WORKDIR=~/smegit
COMMONREPO=https://src.koozali.org/smedev/common.git
# Brian's token, but please use wisely!
OPENAI_API_KEY=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
[local]
USER=<local GITEA user name>
GITEAHOST=<local GITEA URL>
GITEAACCESSTOKEN=<access token for local GITEA>
[remote]
USER=<remote GITEA user name>
GITEAHOST=https://src.koozali.org
GITEAACCESSTOKEN=<access token for https://src.koozali.org GITEA>

View File

@ -64,7 +64,7 @@ fi
if [ $DEBUG ] ; then echo "checking if $TARGETORG/$1 already exists on $LOCALGITEAHOST" ; fi
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" $LOCALGITEAHOST/$TARGETORG/$1)
if [ $DEBUG ] ; then echo "RESPONSE=$RESPONSE" ; fi
if [[ "$RESPONSE" == "200" || "$RESPONSE" == "307" ]] ; then
if [ "$RESPONSE" == "200" ] ; then
echo "Repository $TARGETORG/$1 already exists on $LOCALGITEAHOST - cannot migrate"
exit 1
fi