I have a keystore JKS file have 2 entries with same alias. ie.g
mykey CN=keysto,DC=test,DC=company,DC=com
mykey CN=enccry,DC=test,DC=comapny,DC=com
I need to delete one of the entries. When I run keytool -delete -alias mykey -keystore test.jks, it deletes both the aliases.
If the Keytool deletes both the entries with the same alias, you can follow this thread here to change/rename the duplicate aliases. You can then delete the one you want to delete.
Related
I am trying to get a SHA1 certificated fingerprint for a firebase app but I keep getting this error and I don't know why because I followed indeed the command I found.
You are missing a space between ...debug.keystore" and -alias.
I can login using google signin in debug mode.
I have also tried building an apk like flutter build apk --release and the signin also worked.
I then have proceeded to flutter build appbundle and upload the said bundle to the PlayStore. now none of my users can login into the app.
I ran gradlew signingReport
and a bund of sha1 keys were shown. Most of them where repetition so I used both the different ones that showed on the screen (one for debug other for release) and added them to my firebase config project
When someone tries to login the google popup showing the gAccounts on the phone appear for you to choose one or use a different one. when you press the one you want it disapears but it doesn't log you in. what am I missing?
This is for the debug sha1 key MAC
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
if you wants to generate the relase sha1 key Just replace androiddebugkey with your alisa name and ~/.android/debug.keystore with you keystore file path
For e.g.
keytool -exportcert -list -v -alias tashmania -keystore /Users/SunnySaini/Documents/git/tashmania/app/jks/tashmania.jks
While trying to get SHA certificate fingerprints I run this line and that was the result
line:
keytool -list -v -keystore %USERPROFILE%\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
What else should I do to solve this error?
C:\>keytool -list -v -keystore %USERPROFILE%\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
Illegal option: sisy\.android\debug.keystore
keytool -list [OPTION]...
Lists entries in a keystore
Options:
-rfc output in RFC style
-alias <alias> alias name of the entry to process
-keystore <keystore> keystore name
-cacerts access the cacerts keystore
-storepass <arg> keystore password
-storetype <type> keystore type
-providername <name> provider name
-addprovider <name> add security provider by name (e.g. SunPKCS11)
[-providerarg <arg>] configure argument for -addprovider
-providerclass <class> add security provider by fully-qualified class name
[-providerarg <arg>] configure argument for -providerclass
-providerpath <list> provider classpath
-v verbose output
-protected password through protected mechanism
Use "keytool -help" for all available commands
It looks like %USERPROFILE% returns a value with a space in it.
Try wrapping in quotes like
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
im trying to generate a release certificate fingerprint for a google sign in with firebase and this is my problem
this is my command:
keytool -exportcert -list -v \
-alias goworkkey -keystore /home/ryan/Desktop/keystore.jks
This is my result:
keytool error: java.lang.Exception:
Only one command is allowed: both -exportcert and -list were specified.
if i try this:
sudo keytool -list -v -keystore /home/ryan/Desktop/keystore.jks -alias googlekey -storepass android -keypass android
I get this:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
java.io.IOException: Keystore was tampered with, or password was incorrect
at java.base/sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780)
at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)
at java.base/java.security.KeyStore.getInstance(KeyStore.java:1807)
at java.base/java.security.KeyStore.getInstance(KeyStore.java:1687)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:908)
at java.base/sun.security.tools.keytool.Main.run(Main.java:397)
at java.base/sun.security.tools.keytool.Main.main(Main.java:390)
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at java.base/sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778)
... 7 more
I had the same problem while running the command:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v -storepass android
If I changed it to this:
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
I was properly asked for a password, as explained here, https://developers.google.com/android/guides/client-auth
and all was well.
Do you still have the problem? As this youtube video go to the "Gradle projects" tab (to the right) -> Tasks -> android -> double click on signingReport and you will get it for all your variants: Take the SHA1 which have the Variant and Config type debug
I hope it will be useful for you!
Click on Project Structure which is on the right of Android Studio.
Click on Ads.
Tick AdMob
Click OK button
Wait for sync or manually sync if necessary.
I've added version 4.0.4 of the Nativescript firebase plugin but I can't seem to get the Google authentication to work. Here are the steps I've taken:
Generate the keystore file with the following commands:
keytool -genkey -v -keystore debug.keystore -alias audibledebugkey -keyalg RSA -keysize 2048 -validity 10000
keytool -genkey -v -keystore prod.keystore -alias audibleprodkey -keyalg RSA -keysize 2048 -validity 10000
I've stored these files in the project directory in the .keystore directory. I got the SHA1 and SHA256 using these commands:
keytool -list -v -keystore prod.keystore -alias audibleprodkey -storepass Uey39jhUEvmfoFro -keypass Uey39jhUEvmfoFro
keytool -list -v -keystore debug.keystore -alias audibledebugkey -storepass dzryQnPtfVGHcJH1 -keypass dzryQnPtfVGHcJH1
Then I copy and paste the SHA1 and SHA256 into my project settings in Firebase and then download the new google-services.json and add it to the app/app_resources/Android directory. Finally, I build using the following command:
tns run android --key-store-path ~/Projects/audible/.keystore/debug.keystore --key-store-password dzryQnPtfVGHcJH1 --key-store-alias audibledebugkey --key-store-alias-password dzryQnPtfVGHcJH1
But, it does not work and the following error occurs:
JS: Make sure you've uploaded your SHA1 fingerprint(s) to the Firebase console
JS: Has the SHA1 fingerprint been uploaded? Sign-in status: Status{statusCode=DEVELOPER_ERROR, resolution=null}
What else can I try? Perhaps I missed a step? I didn't quite understand how to setup the Web SDK configuration; do I need to do something special for that step?