-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-crypt: This repository contains a malformed key file. It may be corrupted. #230
Comments
Also having this issue in some environments but not others- I've got a repository which is using a total of 6 GPG keys, generated by myself on Fedora 35 and by other colleagues running Ubuntu 20.04, as well as a docker container using Here's comparison of package versions, and terminal outputs from inspecting the files in Working
|
Hello, i have the same issue. I generate a gpg key and crypt a repository from osx. OSX softwares:
On an ubuntu 20.04 workstation i try to unlock the repository. Ubuntu softwares:
|
I'm not sure whether I encountered the same issue, but let me give some ideas on debugging. If you encounter the message "This repository contains a malformed key file.", you should figure out which keyfile that is. Below Once you know which keyfile is failing, check whether it happens carry a key name Hope this helps. In the mean time, I kindly request improving the error message for using a bad key name... That should have been easier to figure out. |
I ran into this today and spent several hours troubleshooting, but eventually got it working on my end. It does indeed seem to be an issue with the way the key pair is generated, and so perhaps with the version of gpg that generates the key. Steps to reproduce:
Fix: |
Trying to add a new
git-crypt
collaborator as follows.Following steps run on a
MacOS
Big Sur with1 Create the key for a specific user id
Provided rest of the details interactively.
RSA
key was selected2
I switch to the working tree of my GH repo containing encrypted files. I am a
git-crypt
collaborator so I am able to add the new user3
Run a GH PR with the above change, where GH does recognise that a new
git-crypt
collaborator was added, since I see the following message automatically being created in the PR4
I export locally the new user's private key
5
I
scp
this private key to another machine runningDebian 9
andso next steps are executed running the above
gpg
version6
I import the key that was copied during step 5
7
I clone the repo (I have an
ssh
private key for this job8
I cd into the new dir and try to perform a decryption
The text was updated successfully, but these errors were encountered: