Created
August 4, 2021 08:12
-
-
Save taoky/b171bb88328270b57fa04af175dd1708 to your computer and use it in GitHub Desktop.
Emergency finding broken repo in gitlab hashed storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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