aboutsummaryrefslogtreecommitdiff
path: root/ssh-what-repos.py
blob: 3e0972048a6fc6d618f694deed466809ebaf1857 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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