Github(2)
-
[Troubleshooting] 깃허브 히스토리에 민감한 정보가 올라갔을 때 지우는 법
문제 원인 깃허브 저장소에 DB 비밀번호 값을 올리는 대형 사고를 쳐버렸다. 별생각 없이 다시 로컬에서 해당 파일을 지우거나 수정 후 다시 commit 한 뒤 remote origin에 push 해도 히스토리상에 해당 정보가 남게 된다. 해결 방안 원본 레포지토리 클론(clone) git clone --mirror [레포지토리 주소] cd [레포지토리 폴더명] BFG Repo-Cleaner 다운로드 BFG Repo-Cleaner by rtyley $ bfg --strip-blobs-bigger-than 100M --replace-text banned.txt repo.git an alternative to git-filter-branch The BFG is a simpler, faster alternati..
2023.02.19 -
[Troubleshooting] git push -f 실패 (GH006)
문제 원인 원격 저장소에 올라간 커밋을 되돌리기 위해 로컬에서 커밋을 되돌린 후에 강제로 push를 해야 하는데, 강제로 push 하는 명령어가 허용되지 않았다. $ git push -f origin main Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 remote: error: GH006: Protected branch update failed for refs/heads/main. remote: error: Cannot force-push to this protected branch To https://github.com/WhatTheSong/WhatTheSong-Server.git ! [remote rejected] main -> main (prote..
2023.01.27