Skip to content

Instantly share code, notes, and snippets.

@taoky
Created August 4, 2021 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taoky/b171bb88328270b57fa04af175dd1708 to your computer and use it in GitHub Desktop.
Save taoky/b171bb88328270b57fa04af175dd1708 to your computer and use it in GitHub Desktop.
Emergency finding broken repo in gitlab hashed storage
import glob
import sys
configs = glob.iglob("/your/gitlab/path/repositories/@hashed/*/*/*.git/config")
keyword = sys.argv[1]
print("keyword", keyword)
for i in configs:
with open(i) as f:
c = f.read()
if keyword in c:
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment