aboutsummaryrefslogtreecommitdiff
path: root/ssh-what-repos.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-05-03 23:15:33 -0400
committerRob Austein <sra@hactrn.net>2015-05-03 23:18:55 -0400
commit5206bcd72f52bece3ff35268a2284ec4e84c6109 (patch)
tree5c067dd6d63f30da22ca0915e30f6548888efa85 /ssh-what-repos.py
Initial commit of my silly build script collection.
Diffstat (limited to 'ssh-what-repos.py')
-rwxr-xr-xssh-what-repos.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/ssh-what-repos.py b/ssh-what-repos.py
new file mode 100755
index 0000000..3e09720
--- /dev/null
+++ b/ssh-what-repos.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+#
+# List Cryptech git repositories via SSH by asking gitolite for a JSON
+# listing. Not useful unless you have an SSH account, sorry, and not
+# really all that much more interesting than normal gitolite output.
+
+import json, subprocess
+
+cmd = "ssh git@git.cryptech.is info -json -lc"
+
+info = json.loads(subprocess.check_output(cmd.split()))
+
+for name in sorted(info["repos"]):
+ if name != "gitolite-admin" and not any(c in name for c in "*?[]"):
+ print name