NOTE: This will only work if you are an administrator on your Gogs instance, or if an administrator has enabled local repository importing for all users.
First, save the following as migrate.sh
somewhere, and make it executable (chmod +x migrate.sh
):
HOSTNAME="git.cryto.net"
BASEPATH="/home/git/old-repositories/projects/joepie91"
OWNER_ID="$1"
CSRF=`cat ./cookies.txt | grep _csrf | cut -f 7`