Skip to content

Report path to missing internal key#22

Open
pjungwir wants to merge 1 commit into
maxisam:masterfrom
pjungwir:report-missing-key-file-path
Open

Report path to missing internal key#22
pjungwir wants to merge 1 commit into
maxisam:masterfrom
pjungwir:report-missing-key-file-path

Conversation

@pjungwir

Copy link
Copy Markdown

Thank you for continuing to maintain this project!

I had a repo I started with git-crypt in 2018, and after some OS upgrades git status started to fail with this cryptic error:

git-crypt: Error: Unable to open key file - have you unlocked/initialized this repository yet?
error: external filter '"git-crypt" clean' failed 1
error: external filter '"git-crypt" clean' failed             
fatal: bin/bin/foodb: clean filter 'git-crypt' failed  

My gpg key was still there, so I didn't know what the problem was. Finally I looked at the gpg-crypt source code, and there was already a TODO comment to report the path to the missing key. Here is a PR adding that.

Once I made this change, I could see that it was looking for .git/common/git-crypt/git-crypt/keys/default. Instead I had .git/git-crypt/keys/default. So after this my repo worked again!:

mkdir -p .git/common/git-crypt/git-crypt/keys/
cp -a .git/git-crypt/keys/default !$/

This is helpful if we fail while looking for the key in its default
location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant