Skip to content
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 can't handle utf-8 #298

Open
Crims-on opened this issue Sep 8, 2023 · 8 comments
Open

git-crypt can't handle utf-8 #298

Crims-on opened this issue Sep 8, 2023 · 8 comments

Comments

@Crims-on
Copy link

Crims-on commented Sep 8, 2023

> git-crypt unlock ../key
git-crypt: System error: CreateFileA: - 2 - Områden/- 2 - Områden.mdThe system cannot find the path specified.

@alerque
Copy link
Contributor

alerque commented Sep 8, 2023

I use UTF8 both in files and filenames all the time. What exactly led up to this? What system was the locked file created on, what filesystem are you decoding on, etc.?

@Crims-on
Copy link
Author

Crims-on commented Sep 9, 2023

I made a new github for my encrypted files and uploaded them without a problem. I pulled the repo to my second windows computer and attempted to decrypt but got the error above. I have the latest windows release of git-crypt installed, so maybe that's part of the problem

@alerque
Copy link
Contributor

alerque commented Sep 9, 2023

I assume you mean "Git repository" not "github", but whatever...

Was the first machine you used to encrypt and push the repository a similar Windows machine? Can you clone lock/unlock the repository from the first machine? Can you clone it to a different location and unlock also from the first machine?

@Crims-on
Copy link
Author

Crims-on commented Sep 9, 2023

Both are x64 running latest windows, one a laptop and one a pc. I can lock and unlock but haven't tried cloning. Maybe I'll just copy the whole repo over directly

@Crims-on
Copy link
Author

I think I found the problem in the function get_file_attributes in commands.cpp the -z argument isn't given which encodes an å for example to "\303\245" that seems to be the problem. I don't know any cpp though so if you would like to help me change it so it does it like in the get_encrypted_files function I'd really appreciate it :)

@AGWA
Copy link
Owner

AGWA commented Sep 15, 2023

Yes, get_file_attributes should indeed be passing the -z option. Good catch!

@Crims-on - if you could create a repo on GitHub containing the problematic filenames so that I can reproduce the problem, it would help me fix the bug.

@Crims-on
Copy link
Author

I only got one error because it probably didn't iterate through the rest and that was for "- 2 - Områden- 2 - Områden.md"

@maxisam
Copy link

maxisam commented Jan 10, 2024

I have a similar issue. Not exactly like this. It only happens when I change certain characters together. It throws error like "git-crypt.exe" smudge' failed 1" However, I just need to avoid that combination, everything works. I have been using this great tool for a while, but this is the first time I see this.

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

No branches or pull requests

4 participants