aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Delmar Davis <don@suspectdevices.com>2021-01-03 21:49:38 -0800
committerDon Delmar Davis <don@suspectdevices.com>2021-01-03 21:49:38 -0800
commit98c718c11986c85ea6ca7b2b5a50a29034ae62f1 (patch)
tree3a82b9763f7ff011cf508fbb1d8ac76710ec7ec8
parentb0b23533165bbfbbda646d67291e0db7dfe6c1cb (diff)
Lets get this party started.
-rw-r--r--README.md18
-rwxr-xr-xclone-repos.py55
2 files changed, 73 insertions, 0 deletions
diff --git a/README.md b/README.md
index f5cdcdf..6779dbd 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,20 @@
# gitea-configuration
Build notes for getea server.
+
+
+```
+apt-get -y install curl postgresql git
+apt-get install postfix
+adduser --system --shell /bin/bash --group --disabled-password --home /home/git git
+curl -sL -o /etc/apt/trusted.gpg.d/morph027-gitea.asc https://packaging.gitlab.io/gitea/gpg.key
+deb [trusted=yes arch=amd64] https://packaging.gitlab.io/gitea gitea main" | sudo tee /etc/apt/sources.list.d/morph027-gitea.list
+update.sh
+apt-get install gitea
+su - postgres
+postgres@shelly:~$ createuser -P git
+... add passwd
+postgres@shelly:~$ createdb gitea -O git
+ssh-keygen
+cat ~/.ssh/id_rsa.pub
+cd ~gitea/gitea-repositories/feurig
+git clone --mirror git@github.com:feurig/redmine-configuration.git
diff --git a/clone-repos.py b/clone-repos.py
new file mode 100755
index 0000000..db26a00
--- /dev/null
+++ b/clone-repos.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+"""-------------------------------------------------------------------------clone-repos.py
+Make mirror copies of repos from github and bitbucket.
+Author: D. Delmar Davis <don@suspectdevices.com>
+Copyleft: (c) 2020 D. Delmar Davis <don@suspectdevices.com>
+Liscense: mit
+"""
+#from github import Github
+#import json
+import subprocess
+#import urllib2
+
+username = "feurig"
+repodir = "/var/www/git"
+
+githubrepos=['feurig/arduino-core-105','feurig/Arduino_STM32_MIDI_project',
+ 'feurig/Cohen','feurig/ems-light','feurig/ems2','feurig/failandflail',
+ 'feurig/libmaple','feurig/libmaplemidi-cma','feurig/maple','feurig/maplebacon',
+ 'feurig/midimonster2012','feurig/pubcrawler','feurig/python-dialog',
+ 'feurig/redmine-configuration','feurig/rtmidi','feurig/Suspect-Devices-Open-Hardware',
+ 'feurig/wsgi-bitbucket-mirror',
+]
+
+bitbucketrepos=['feurig/ems-light','feurig/musicbox','feurig/straight-from-hell.com',
+ 'feurig/trashterm','feurig/missinglink-hardware','feurig/bnc-proprietary',
+ 'feurig/ems-firmware','feurig/ems-golang','feurig/ems-framework',
+ 'joedumoulin/sesh','suspectdevicesadmin/ansible']
+
+
+for repo in githubrepos:
+ url="git@github.com:"+repo+".git"
+ print "Cloning :",url
+ subprocess.call(["/usr/bin/git", "clone", "--mirror", url], cwd=repodir)
+
+for repo in bitbucketrepos:
+ url="git@bitbucket.org:"+repo+".git"
+ print "Cloning :",url
+ subprocess.call(["/usr/bin/git", "clone", "--mirror", url], cwd=repodir)
+
+# used to create lists of repos
+#response = urllib2.urlopen("https://api.bitbucket.org/2.0/repositories/"+username+"?pagelen=100")
+#data=json.loads(response.read())['values']
+#for record in data:
+# url="git@bitbucket.org:"+username+"/"+record['slug']+".git"
+# print "Cloning :",url
+# subprocess.call(["/usr/bin/git", "clone", "--mirror", url], cwd=repodir)
+#git clone git@bitbucket.org:feurig/missinglink-hardware.git
+
+
+#g = Github()
+#user = g.get_user(username)
+#for repo in user.get_repos():
+# print"'"+username+"/"+repo.name+"',"
+
+