Waztom / xchem-CAR

5 stars 0 forks source link

Reading GitCrypt Key #49

Closed GitGud93 closed 3 years ago

GitGud93 commented 3 years ago

Hi,

I'm struggling to get the GitCrypt key read. Unsure if this is because of its location or if I need to move it into a subdirectory of my ubuntu home drive for it to work? Just an example screenshot of one of my attempts below. I also wasn't sure if I needed to add the extension for the file but it didn't specify what that was under properties?

image

Waztom commented 3 years ago

Hi - those 'no such file or directory messages' are also something we need to look at. When you're inside the 'xchem-CAR' directory, when you run the 'ls' command, can you see the contents of the 'xchem-CAR' directory?

I do not know (don't think so) if storing the 'crypt-key' in your Windows folders will be an issue - the git-unlock command should look like git-crypt unlock <'path to git-crypt crypt-key'> It looks like your path has spaces in the git-crypt command and thinks the crypt-key is in the 'C:/Users/Timothy' folder - so it's not picking up the rest of the path after the first space between Timothy and John.

It is worth trying to copy it into your WSL home folder and running the command again. NB to use 'Tab' to autocomplete Linux commands and especially paths to folders and files.

GitGud93 commented 3 years ago

Thanks! I can see CAR, the readme and a speedysetup.sh but nothing else in the directory. Yes i thought the spaces could be a problem so i moved the file to C:/Users/xchemCAR however this didn't change anything I tried other locations as well as adding file extensions but no luck. An example below that I just tried now again. I am unable to copy the file into the home folder as it says I do not have permission (It's on the network). Do i need to copy/move the file via the terminal to have access? image

GitGud93 commented 3 years ago

I think it worked! I had to copy it into one further subdirectory to have permission and it didn't give me an error this time round

Waztom commented 3 years ago

Nice! I will close this issue for now. Good on you for troubleshooting to a solution!

Waztom commented 3 years ago

I think it worked! I had to copy it into one further subdirectory to have permission and it didn't give me an error this time round

BTW - to check if it worked, you should be able to open the environment file at 'xchem-CAR/.devcontainer/.devcontainerenv' and not see giberish. You should be able to see letters and numbers for the various API keys. This is the content that is protected by git-crypt, so that we don't make the API keys public.

GitGud93 commented 3 years ago

Thanks! Confirmed to work!