blob: 2a2687e03660aa6644fc0b5c424edbe542b2ee58 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/bash
USERNAME=$(git config github.user)
PASSWORD=$(pass show dev/github.com|awk '/^token:/ {print $2}')
ORGANIZATION="openSUSE-Python"
curl -s -u mcepl:$PASSWORD --json "{ \"organization\": \"$ORGANIZATION\" }" https://api.github.com/repos/JimmXinu/FanFicFare/forks |tee /tmp/curl-output.json
git remote update
git remote -v
git remote add github (curl -s -u mcepl:(pass show dev/github.com|awk '/^token:/ {print $2}') https://api.github.com/repos/JimmXinu/FanFicFare/forks -d ''|awk -F '"' '/clone_url/ {print $4 ; exit}')
git remote set-url --push github (curl -s -u mcepl:(pass show dev/github.com|awk '/^token:/ {print $2}') https://api.github.com/repos/JimmXinu/FanFicFare/forks -d ''|awk -F '"' '/ssh_url/ {print $4 ; exit}')
|