GitLab permanently remove sensitive information or large files

BFG has an open source tool can achieve this function
for the code has been pulled down, do nothing, because others have seen

Install JAVA environment
download jdk-8u201-windows-x64.exe, the way to enter
the configuration environment variable
JAVA_HOME = C: \ Program Files \ the Java \ jdk1.8.0_201
the PATH added:
% JAVA_HOME% \ bin
% JAVA_HOME% \ jre \ bin
CLASSPATH =;.% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ dt.jar;% JAVA_HOME% \ lib \ tools.jar

Cleaning the code
because Gitlab branch protection is enabled by default, not be forced to push and needs to close branch protection
git clone --mirror git: //example.com/some-big-repo.git
delete large files:
the Java -jar bfg.jar - Bigger blobs at strategically----strip Within last text-100M --replace the password.txt repo.git
CD repo.git
Git The expire --expire The reflog is now --all =
Git = GC --prune now --aggressive
Git Push

For unknown reasons, the countdown twenty-three push the line less than Gitlab, the need for a server to perform a separate
line git directory: / var / opt / gitlab / git-data / repositories
cleaning is completed, the client needs to execute git reset --hard origin / master to avoid submitting sensitive information again, and finally open branch protection

Reproduced in: https: //blog.51cto.com/14382498/2409419

Guess you like

Origin blog.csdn.net/weixin_33924770/article/details/93036957