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
File decryption fails (wrong final block length) on Windows #4746
Comments
Could you try steps with |
sure - but got the same problem with the same message Some more information about the project: |
I just remembered. You cannot encrypt more than 1 file, because the second invocation nullifies the first. This is documented. http://docs.travis-ci.com/user/encrypting-files/#Encrypting-multiple-files |
@BanzaiMan Thanks for your time! But I'm afraid I don't get it... "You cannot encrypt more than 1 file" - I knew this and I've only encrypted a single file and of course I have only one openssl line in my .travis.yml. The other key/iv pair was from the last attempt and is now deleted. Or does does the |
@lukeIam In the build you indicated, I see 2 sets of environment variables set by In https://travis-ci.org/lukeIam/Vocaluxe/builds/78738939, I see that you've removed one, but perhaps you removed the wrong one. |
I removed all four variables with I started an other try and got the same variable again. Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
D:\Projects\Vocaluxe>travis env list
# environment variables for lukeIam/Vocaluxe
encrypted_a377c9765acb_key=[secure]
encrypted_a377c9765acb_iv=[secure]
D:\Projects\Vocaluxe>travis env unset encrypted_a377c9765acb_key
[x] removing environment variable $encrypted_a377c9765acb_key
D:\Projects\Vocaluxe>travis env unset encrypted_a377c9765acb_iv
[x] removing environment variable $encrypted_a377c9765acb_iv
D:\Projects\Vocaluxe>travis env list
# environment variables for lukeIam/Vocaluxe
D:\Projects\Vocaluxe>travis whoami
You are lukeIam
D:\Projects\Vocaluxe>travis encrypt-file -r lukeIam/Vocaluxe travisKey
encrypting travisKey for lukeIam/Vocaluxe
storing result as travisKey.enc
storing secure env variables for decryption
Please add the following to your build script (before_install stage in your .tra
vis.yml, for instance):
openssl aes-256-cbc -K $encrypted_a377c9765acb_key -iv $encrypted_a377c9765a
cb_iv -in travisKey.enc -out travisKey -d
Pro Tip: You can add it automatically by running with --add.
Make sure to add travisKey.enc to the git repository.
Make sure not to add travisKey to the git repository.
Commit all changes to your .travis.yml.
D:\Projects\Vocaluxe> |
Hmmm. Interesting. Do you have access to another OS (Linux or Mac)? Does this happen there, too? |
I'll install a linux... |
Maybe related: we had a report of a user not able to encrypt env variables on Windows. |
On ubuntu 14.04 LTS x64 it worked:
|
related to @cotsog - it was failing in a Windows 8 machine, using the default Command Prompt and ConEmu x64 |
This is also happenning on Windows 7 x64 with Git Bash command prompt. |
Also happening on Windows 10. Trying to decrypt a Google Apps Engine service account json, with no luck. Any recent updates that could have broken this? |
I am experiencing the same issue on Windows 10 using the default command promt.
|
+1, using default prompt on Windows 10 Pro 1511 to encrypt a key and have Travis CI decrypt to push to our server
|
+1 |
+1 windows 10 Git Bash |
1 similar comment
+1 windows 10 Git Bash |
+1 |
Ok, finally I made it by using Linux, Ubuntu to deploy it |
@Waydrow Yup, that's what I did as well. I've installed Ubuntu on a virtual machine using VirtualBox. But... +1 |
@lukeIam Do you solved the problem? |
@seayxu not really - I installed Ubuntu in a virtual box... |
@lukeIam So do i,but got the same problem. |
@lukeIam Last night,i try again,no problem |
I also meet the problem: I has try cmd and git shell in win7, but get the same result. |
Got the same problem: https://travis-ci.org/iSCInc/status/builds/123697131! I use Windows 10 - Git Bash, CMD & Powershell. |
@TomeOkin @SuriyaaKudoIsc if you don't want to use Linux system,just see this way;I found the reason for this problem is that the Travis encryption generation variable is different from the Linux system in the windows system.So,I suggest you use Linux system do this. |
@seayxu Well... 😅 I can't speak or read in Chinese. |
+1 Using Windows 8.1 here and got the same error. Encrypting the file on linux (using Google Cloud Shell) works fine |
This is also happenning on Windows 7 x64 with Git Bash command prompt. |
This issue still occurs. |
+1 |
Still experiencing this on Windows. |
+1 Win10 |
Decrypting my file fails with
bad decrypt: wrong final block length
.I used
travis encrypt-file file
under Windows to encrypt my file without problems.Also I added the generated decryption command to the
before_install:
section:(Also tried the
--add
option oftravis encrypt-file
)Here are parts of the build log:
Any suggestions?
The text was updated successfully, but these errors were encountered: