I have tried many times and many ways to set the keystore properly. For info I am on Windows.
I don't use a custom keystore just the way you show it. I run the command in powershell and type the password Infinity but it only seems to ask:
Enter keystore password:
Re-enter new password:
it generates, I use the base64 command and get a RSA certificate txt file (using cmd including BEGIN and END certificate. I put only the text inbetween begin and end certificate in that secret. but also tried powershell which directly gives only the base64 string which I used after knowing that)
I use that to set the keystore 64 secret.
Afterwards I try to build and everything goes fine until after apk build and says Keystore password was incorrect (Execution failed for task ':app:packageRelease'.
A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
com.android.ide.common.signing.KeytoolException: Failed to read key from store "/home/runner/work/infinity_for_reddit_builder_gitstudying/infinity_for_reddit_builder_gitstudying/app/keystore.jks": Keystore was tampered with, or password was incorrect).
I literally tried using keytool to list it and say pass= Infinity, and shows the keystore. If I put in anything else even infinity it will say wrong password when checking.
So I know the password is Infinity and in your own documentation it says this is the default so I don't set it. What could still go wrong. I am done waiting minutes on the action to just tell me the keystore is wrong.
Also I think it would help if the command includes -storepass Infinity by default as that would take away any guessing if you are blindly typing.
FYI
Manually tried
# Decode the keystore
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > keystore.jks
# Try to list the keystore contents to validate the passwords
if ! keytool -list -v \
-keystore keystore.jks \
-storepass "${{ steps.set_secrets.outputs.storepass }}" \
-keypass "${{ steps.set_secrets.outputs.keypass }}" \
-alias "${{ steps.set_secrets.outputs.keyalias }}" > /dev/null 2>&1; then
echo "Error: Invalid keystore password, key password, or alias"
echo "Please check your keystore credentials and try again"
exit 1
fi
The decode works perfectly and the list also shows all the certificate info
I have tried many times and many ways to set the keystore properly. For info I am on Windows.
I don't use a custom keystore just the way you show it. I run the command in powershell and type the password Infinity but it only seems to ask:
Enter keystore password:
Re-enter new password:
it generates, I use the base64 command and get a RSA certificate txt file (using cmd including BEGIN and END certificate. I put only the text inbetween begin and end certificate in that secret. but also tried powershell which directly gives only the base64 string which I used after knowing that)
I use that to set the keystore 64 secret.
Afterwards I try to build and everything goes fine until after apk build and says Keystore password was incorrect (Execution failed for task ':app:packageRelease'.
I literally tried using keytool to list it and say pass= Infinity, and shows the keystore. If I put in anything else even infinity it will say wrong password when checking.
So I know the password is Infinity and in your own documentation it says this is the default so I don't set it. What could still go wrong. I am done waiting minutes on the action to just tell me the keystore is wrong.
Also I think it would help if the command includes -storepass Infinity by default as that would take away any guessing if you are blindly typing.
FYI
Manually tried
The decode works perfectly and the list also shows all the certificate info