-
Notifications
You must be signed in to change notification settings - Fork 104
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
Transcrypt can fail to run in Jenkins when Git hooks are disabled: mkdir: can't create directory '/dev/null': File exists
#153
Comments
Hi @paomeow I haven't been able to reproduce this problem. Can you provide more information about your containers, such as the operating system version and version of bash? After checking code changes since version 2.1.0 I have made a guess about something that might cause a problem, if a version of bash interprets things differently than on my system. Could you try the Transcrypt version in commit bbce281 to see if the change helps? |
I have the same error occuring when cloning a repository from jenkins then trying to decrypt, not in a container though, but on Manjaro. That fix in the PR did not work for me. Is there any way to get more verbose information from transcrypt to know where exactly it fails? transcrypt 2.2.3 |
Hi @velvetant unfortunately transcrypt doesn't have a verbose mode. You could try Git trace options like these but I'm not sure how much they will tell you. The most likely problem is the Manjaro system missing a requirement as outlined in the README The best way to debug an issue is probably to run the underlying commands that transcrypt does, but manually and one step at a time to see if you get any useful error feedback. This will be difficult to do in a Jenkins test environment, but maybe you can spin up an equivalent system that you can interact with? If you can, start by installing/configuring transcrypt in the repo as usual. Here are the commands to run just the smudge (decrypt) operation on a file called sensitive_file: Show raw encrypted file contents
# git show :sensitive_file
Decrypt file contents using smudge operation (git_smudge function in Transcrypt)
# git show :sensitive_file | ./transcrypt smudge If that doesn't give you any clues you could try running the underlying This would look something like: # git show :sensitive_file | ENC_PASS="correct horse battery staple" openssl enc -d -aes-256-cbc -md MD5 -pass env:ENC_PASS -a |
Hi @jmurty - thanks for your quick support! I tried all of your steps above and while Oh, funnily enough I just tried with another user on that system and it worked. I need to find out what is different. |
You can see in the Lines 178 to 185 in 154218a
Try running each of the commands on the problem system and user environment, and hopefully one of the steps will give an error with some actionable feedback. I suppose it's also possible there's an error somewhere in the transcrypt script before it calls that function. To debug that you'd need to edit transcrypt to have print statements at key points to try and find where it's failing, especially around the section at the bottom of the file near the comment |
Dear @jmurty, thank you so much for the support and guiding me in debugging this, much appreciated. Turns out, in the end, it is not a transcrypt bug at all. The jenkins git plugin introduced a config change sometimes last year and disabled all hooks by setting Anyway, nothing to do from trancrypt's side I reckon? Thank you again and more broadly thanks to all working on transcrypt, impressive script!
|
Hi @velvetant what a weird issue, I bet that config change broke things in surprising ways for many people. Thanks for following up, and I agree there's nothing much for us to do on the transcrypt side. |
mkdir: can't create directory '/dev/null': File exists
I've renamed this issue to make it easier for people to find, and now that you've found the root cause others will be able to fix it relatively quickly. Cheers! |
Newer version of transcrypt does not work on containers for our DevOps automated deployment.
transcrypt -c aes-256-cbc -p 'xxxxxxxxxxxxx' --yes
The result is always the error below:
mkdir: can't create directory '/dev/null': File exists
The text was updated successfully, but these errors were encountered: