'How do I do "Authenticating Your Client with Google"?

How do I Authenticating Your Client correctly with google? I'm following this tutorial https://developers.google.com/android/guides/client-auth

I copy this text into my command prompt -

keytool -exportcert -list -v \ -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

I get this message back "-alias is not recognized as an internal or external command, operable program or batch file."

What am doing wrong?



Solution 1:[1]

set your cmd path to jdk then run this cmd
WINDOWS
keytool -list -v -keystore %USERPROFILE%/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

MAC/LINUX
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Solution 2:[2]

I think the end goal is to generate the SHA1 key.

Best Alternative is to follow following steps:

  1. In Android Studio, click on gradle on the right side panel.

enter image description here

  1. And then navigate to app > Tasks > android > signingReport.
  2. Double clicking it will generate the SHA1 key.

Solution 3:[3]

best way to get your SHAI is

keytool -list -v -keystore "C:\Users\username\ .android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kusal Saraf
Solution 2
Solution 3