How to Get SHA-1 key in React Native cli?
There is debug.keystore available by default in android => app folder so we can use it to generate SHA1 key.
The command is as follows
keytool -exportcert -keystore ./android/app/debug.keystore -list -v
It will ask for password so just press Enter.
As far as I understand you, it's about Android.
You need input certificate fingerprint, what you use for sign *.apk file.
For generate SHA-1 fingerprint, open a terminal window and enter the following:
keytool -list -v -keystore PATH_TO_YOUR_KEYSTORE.keystore -alias YOUR_ALIAS_NAME -storepass YOUR_STORE_PASS -keypass YOUR_KEY_PASS
This should look something like this:
BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75
You can find more information here
If you don't have a certificate yet, I recommend you create it.
How to create a certificate you can read here.
Get SHA1 Key
Simple run below command :
keytool -list -v -keystore ./android/App/debug.keystore -alias androiddebugkey -storepass android -keypass android
Windows:
– Open a terminal window– Change the directory to the JDK bin directory. The path of the JDK depends upon the operating system you are using
cd C:\Program Files\Java\jdk1.8.0_121\bin
– Now we have to run the following command using the keytool.exe file in JDK/bin
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Ubuntu/Mac
– Open a terminal window
– Now run the following command
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
For more details click Here
From React-native Project:
– Run this command in React-Native App directorycd android && ./gradlew signingReport
– copy the SHA1 from the debug key (This generates two variant keys. You can copy the 'SHA1' that belongs to the debugAndroidTest variant key option.)