I have sucessfully imported the certificate by below command:
keytool -import -alias "alias-name" -file
"C:somepathCertificateportal.cer
-keystore C:Program FilesJavajdk1.7.0_79jrelibcacerts"
Now I am trying to delete the imported certificate with
keytool -delete -alias "alias-name" -keystore
"C:Program FilesJavajdk1.7.0_79jrelibcacerts" -storepass changeit
But I am end with the below error message:
KeyTool error : java.lang.Exception : Alias does not exist
Reporter
3,8395 gold badges32 silver badges46 bronze badges
asked Feb 22, 2017 at 14:27
Subodh JoshiSubodh Joshi
12.3k29 gold badges104 silver badges194 bronze badges
1
For Ubuntu / Linux
List all entries from your keystore with the respective alias
keytool -list -v -keystore "myKeyStore.jks" -storepass myPassword
The verbose option ‘-v’ is important, in order to see the aliases
Example output:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: 1
Creation date: Dec 4, 2019
Entry type: PrivateKeyEntry
Certificate chain length: 2
Certificate[1]:
Owner: CN=yourname.com, O=Your Name, C=XX
Issuer: CN=Issuer CA, O=Issuer Name, C=XX
Serial number: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Valid from: Mon Feb 25 10:04:56 GMT 2019 until: Wed Feb 24 10:04:56 GMT 2021
Certificate fingerprints:
SHA1: 9F:35:31:B1:A9:C2:37:8D:61:2F:9B:ED:82:3F:45:26:E1:D9:18:83
SHA256: 34:65:C8:B6:4D:24:9D:20:3C:24:7B:B7:7B:F5:6B:F3:BE:79:11:BE:4F:8C:21:D2:9E:86:CC:AD:17:84:01:C4
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
Extensions:
...
answered Nov 26, 2020 at 9:42
0
Check if the alias exists. You can list all entries using:
keytool -list -keystore "C:Program FilesJavajdk1.7.0_79jrelibcacerts" -storepass changeit
This command will show all existing aliases in the file. If it’s not there, that’s why you can’t delete it.
answered Feb 26, 2017 at 17:50
In sometimes you may get this error even the alias present in the keystore. Which may be you are not given the alias name properly while passing as arguments.
Ex : letsencryptisrgx1 [jdk]
In the above alias name you can see the square brackets which is the issue in my case.
When I give the entire name in double quotes it works.
$JAVA_HOME/bin/keytool -list -v -alias "letsencryptisrgx1 [jdk]" -keystore $JAVA_HOME/lib/security/cacerts
answered Dec 16, 2021 at 7:02
1 answer
You can have a look at your aliases, eg:
# Alternative parameter is -v which will list all detailsroot@server:/tmp# $JRE_HOME/bin/keytool -keystore /var/atlassian/application-data/jira/some-jira.jks -list -v
You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.
- Comment
/opt/atlassian/bitbucket/5.10.0/jre/bin/keytool -list -keystore /var/atlassian/application-data/bitbucket/shared/config/ssl-keystore
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
tomcat, Jul 4, 2018, PrivateKeyEntry,
Certificate fingerprint (SHA1):
1, Jul 4, 2018, PrivateKeyEntry,
Certificate fingerprint (SHA1):
I have removed the fingerprint, so it’s not an error that there is no fingerprint visible. But the fingerprints are the same.
You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.
- Comment
Please use the -list -v parameters to see the aliases.
You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.
- Comment
Sorry, I forgot the -v option:
Your keystore contains 3 entries
Alias name: 1
Alias name: tomcat
Alias name: te-5a122007-b3f6-46a8-93c9-51797c76ba3d
The third one I have imported it to the keystore using following command:
keytool -importkeystore -destkeystore /var/atlassian/application-data/bitbucket/shared/config/ssl-keystore -srckeystore /var/atlassian/application-data/bitbucket/shared/config/godaddy.pfx -srcstoretype PKCS12
I had to enter the password for the keystore and the pfx and it generated the cryptical alias name. I changed the configuration to use the new alias, but I can’t open the web interface.
You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.
- Comment
You might not be importing into the keystore that is used by your Bitbucket Server.
Perhaps you can use the SLLPoke utility to troubleshoot.
Just for reference, you can rename the alias to something more readable:
root@server:/opt/atlassian/jira/jre/lib/security# $JRE_HOME/bin/keytool -changealias -alias "old-alias" -destalias "new-alias" -keystore cacerts
You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.
- Comment
I’m sure that it is the right keystore. When I change the configuration to the alias «tomcat» and restart the services with «stop-bitbucket.sh && start-bitbucket.sh» it’s working.
You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.
- Comment
Suggest an answer
Still have a question?
Get fast answers from people who know.
Was this helpful?
Thanks!
** Updated 19th December 2022 **
The steps from the original blog are mostly not required, but I have kept the details as it may help in speicific circumstances. From Cloud Connector version 2.13 there is now the possibility to upload a P12 certificate. The P12 is an all in one certificate that contains the public, private and certificate chain.
I created my P12 with the following command.
openssl pkcs12 -export -inkey key.pem -in newcombined.crt -out server-combined.p12
This can then be directly uploaded from the Cloud Connector interface.
If however you do experience any issue with the certificate being accepted then you should monitor the Cloud Connector log file, using a command such as below
tail -n50 -f /opt/sap/scc/log/ljs_trace.log
** Previous blog below **
You may already be using the cloud connector and now you wish to secure it. Depending upon your server setup and organisation’s policies this can be straight forward or more involved.
For most vanilla setups, we can generate a Certificate Signing Request (CSR) from the SAP Cloud Connector’s user interface and then upload the signed certificate response. There’s a great tutorial here https://developers.sap.com/tutorials/cp-connectivity-install-cloud-connector.html
If however you have an existing wild card certificate to use there are some additional steps, those are captured in this blog post.
- Retrieve Keystore Password
- Convert existing private key and existing certificate into p12
- Update Keystore with Wildcard Certificate
Pre-requisites
- Root access to linux installation of SCC
- Private Key used to generate wildcard certificate, usually .pem
- Wildcard public certificate, usually .crt
Background
The SAP Cloud Connector (SCC) uses tomcat and a java keystore under the covers. The keystore used by Tomcat hold the SSL certificates. Typically you interact with the java keystore with the keytool command. Keytool does not support importing private keys. We therefore need to replace the existing keystore certificate.
1. Retrieve Keystore Password
The keystore used by the SCC is password protected. This password is generated during install, but it is not displayed. We can retrieve the password with the following command.
This command should be executed as root.
## Retrieve existing keystore password
java -cp /opt/sap/scc/plugins/com.sap.scc.rt*.jar
-Djava.library.path=/opt/sap/scc/auditor
com.sap.scc.jni.SecStoreAccess
-path /opt/sap/scc/scc_config -p
## Verify access to SAP Cloud Connector keystore
ls -l /opt/sap/scc/config/ks.store
Using the password retrieved we can confirm it is valid and view the contents of our existing keystore (ks.store).
## List existing certificates
keytool -list -keystore /opt/sap/scc/config/ks.store
The output from keytool shows the alias used for the SCC certificate is tomcat. We need to replace the tomcat entry with our own certificate.
2. Convert existing private key and existing certificate into p12
The keytool requires a pkcs12 format certificate, we can generate that with the private key (pem) and certificate (crt) file.
We can inspect our 2 files to confirm they have the expected contents.
We should see
—–BEGIN PRIVATE KEY—– in the .pem file
—–BEGIN CERTIFICATE—– in the .crt file
## Convert .pem and .crt into .p12 for keytool
openssl pkcs12 -export
-name tomcat
-inkey private.pem
-in cert-x509.crt
-out server.p12
Let’s understand this command with some placeholders, the name tomcat is the default certificate alias the SCC uses.
openssl pkcs12 -export
-name [tomcat is the certificatet name the SCC wants]
-inkey [your private.pem]
-in [your signed certificate.crt]
-out [export file to be generated.p12]
3. Update Keystore with Wildcard Certificate
With the commands below we can update the keystore with our converted (.p12) certificate.
## Backup existing keystore
cp /opt/sap/scc/config/ks.store /opt/sap/scc/config/ks.bak
## Replace existing tomcat alias with our certificate
keytool -importkeystore -deststorepass hM1e3nnT64areVVV -destkeypass hM1e3nnT64areVVV
-destkeystore /opt/sap/scc/config/ks.store -srckeystore /hana/cloud-connector/certificates/server.p12
-srcstoretype PKCS12 -srcstorepass topsecret -alias tomcat
## Set file permissions correctly
chown sccadmin:sccgroup /opt/sap/scc/config/ks.store
## Restart the cloud connector
systemctl restart scc_daemon
To understand the keytool command I have added some placeholders.
## Java keytool command
keytool -importkeystore -deststorepass [SCC password from step 1]
-destkeypass [SCC password from step 1]
-destkeystore /opt/sap/scc/config/ks.store ## This is the default scc keystore path
-srckeystore [path to certificated exported by openssl command above]
-srcstoretype PKCS12 ## This is the format we exported from openssl
-srcstorepass [password input into openssl command]
-alias tomcat ## tomcat is the alias we need to use for the SCC to find our certificate
All being well we should now see the secure padlock in our browser be able to load the SAP Cloud Connector interface without any security warnings.
Troubleshooting
Errors are usually reported in the SCC log found here
## Check the SCC log file for errors
tail /opt/sap/scc/log/ljs_trace.log
The Java version is important, as the SCC and Tomcat rely upon java, using a current java version provides maximum compatibility. If you see errors such as these below
- Not Secure
- This site uses an outdated security configuration
- Site Is Using Outdated Security Settings
- Connection Not Secure
- This page uses weak encryption
- Your connection to this site is not fully secure
This can can be caused the installer picking an old java version. The SCC is then not able to use modern encryption algorithms. To fix this, update your $JAVA_HOME and re-install the same scc version with the –force and -U options.
rpm --force -U ./com.sap.scc-ui-2.12.3-8.x86_64.rpm
Conclusion
With a few steps we can secure the cloud connector with a wild card certificate. The SAP Cloud Connector is built on open standards that allows it to be configured to meet your organisations needs.
In the development/testing environments, we sometimes want to create and use self-signed certificates, however Java would complain when trying to call an https
endpoint that is using a certificate that is not already in Java’s truststore.
One option would be inserting the certificate to Java cacerts
file at build time, but this will be done at Docker image build time. Another approach can be mounting the entire custom cacerts
(that includes your custom certificate) over the default one in the Docker image at container runtime. The good part of this is that you can do it at deploy time and you don’t have to hardcode anything in the image.
- Create a test folder:
mkdir /home/bulug/Documents/cacerts-test
- Start a new Java JRE container:
docker run -it -v /home/bulug/Documents/cacerts-test:/cacerts-test openjdk:8u102-jre
- Copy the
cacerts
in the container to the test folder:cd /cacerts-test; cp /etc/ssl/certs/java/cacerts .
- Test that the
server-alias
does not exist incacerts
:keytool -list -alias server-alias -keystore cacerts -storepass changeit
- this should return
keytool error: java.lang.Exception: Alias <server-alias> does not exist
- Generate self-signed certificates:
keytool -genkey -alias server-alias -keyalg RSA -keypass changeit -storepass changeit -keystore keystore.jks
- Export
server.cer
:keytool -export -alias server-alias -storepass changeit -file server.cer -keystore keystore.jks
- Add
server.cer
tocacerts
:keytool -import -v -trustcacerts -alias server-alias -file server.cer -keystore cacerts -keypass changeit -storepass changeit
- Now, check again if the new certificate is in the
cacerts
:keytool -list -alias server-alias -keystore cacerts -storepass changeit
- this should return something like
server-alias, Sep 9, 2017, trustedCertEntry,...
- Exit the container:
-
CTRL + P Q
-
- Start a new container and mount the cacerts at
/home/bulug/Documents/cacerts-test/cacerts
over the one in the container:-
docker run -it -v /home/bulug/Documents/cacerts-test/cacerts:/etc/ssl/certs/java/cacerts openjdk:8u102-jre
-
- Verify that the
cacerts
in the new container has the certificate:keytool -list -alias server-alias -keystore /etc/ssl/certs/java/cacerts -storepass changeit
- this should return something like
server-alias, Sep 9, 2017, trustedCertEntry,...
This strategy can be applied to any Java based containers.
Resources:
https://docs.oracle.com/cd/E19798-01/821-1841/gjrgy/index.html
Содержание
- What’s keytool, why can’t it be found, and why does Firebase even want a “SHA-1”?
- What is “keytool”?
- Ok, where is it?
- I already installed Android Studio, do you mean I have to install Java too?
- I installed the Android SDK with Unity, do you mean that I need to install the JDK or Android Studio to use Firebase?
- debug.keystore doesn’t exist!
- This sounds cool, but what’s the SHA-1 and why does Firebase care?
- Wrap Up
- ошибка keytool: java.ленг.Исключение: не удалось установить цепочку из ответа
- 6 ответов
- Шаг 1:
- Шаг 2:
- Шаг 3:
- Шаг 4:
- Файл хранилища ключей не существует
- 7 ответов
If you’ve followed any of the Firebase tutorials for Android, you probably came across an instruction like “Add the SHA-1 hash for your project.” You may have even been linked to this page, where you were told to type keytool -list -v followed by a strange symbols involving -keystore .
Now for many developers, including most Google employees with the standard dev tools, this just works and we don’t question it. Others will get one of these super exciting error messages:
keytools: command not found
‘keytool’ is not recognized as an internal or external command
This is also an optional step for many of Firebase’s products. Currently Firebase Dynamic Links and some Firebase Authentication products (such as Google Authentication and Phone Authentication) are the only products that need a SHA-1.
Whenever I need to figure out what a command does, I search for man . My first result is Oracle’s documentation saying:
Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.
That’s a really cool one liner, but what you need to know is that it generates a file (called a “keystore”) that can be used to “sign” an Android application. This signature is used to verify authenticity. The really cool thing here is that it’s practically impossible to fake a signature without stealing the keystore file, but you can publish a “fingerprint” of your signature so anyone can validate the signature on their own.
Ok, where is it?
keytool is a standard program that ships with the Java Development Kit (JDK) or runtime (JRE). Both Oracle’s JDK and OpenJDK ship with it, and on MacOS and Linux it’s usually simple enough to just install the JDK and call it a day.
On Windows or complex environments, you’ll want to look in the /bin directory of the JDK. You can either invoke it directly by typing this full path, or add it to your system’s $PATH environment variable.
I already installed Android Studio, do you mean I have to install Java too?
keytool ships with a standard Android Studio install as part of the JRE needed to run Android Studio itself. If you look at where you installed Android Studio (usually C:Program FilesAndroidAndroid Studio on Windows or /Applications/Android Studio on Mac), you’ll find a folder inside called jre . You’ll be able to find the keytool command there.
Helpful hint: you can drag/drop this keytool application to get its full path in your terminal on MacOS, Windows 10, and most standard Linux distributions!
I installed the Android SDK with Unity, do you mean that I need to install the JDK or Android Studio to use Firebase?
If you navigate to your Unity installation, you should see keytool under PlaybackEngines/AndroidPlayer/OpenJDK . Once again, you can drag and drop this into a terminal as demonstrated above or you can add this to your $PATH if you feel so inclined.
debug.keystore doesn’t exist!
If you’ve gone through all of this, enter the appropriate command line, and you get a new message saying:
keytool error: java.lang.Exception: Keystore file does not exist:
All you have to do is perform a full Android build. debug.keystore will be auto-generated the first time you make an Android device build of an application.
If you want to look for the debug.keystore on your own, this is usually stored in a hidden folder named .android in your user home directory. You can type into a terminal ls
/.android/debug.keystore on Linux and MacOS or dir %USERPROFILE%.androiddebug.keystore on Windows to find it.
This sounds cool, but what’s the SHA-1 and why does Firebase care?
The act of signing an application doesn’t have any intrinsic value without some way of verifying the identity of the signer. This is what the SHA-1 fingerprint provides, you can pull the SHA-1 out of a signed Android game or application and check it against some central point of authority to ensure the signature itself was valid. But who is the authority for something that lives on a local development machine?
When an application talks to Firebase, Firebase should only consider the application legitimate if its SHA-1 corresponds to one you have listed in the Firebase Console for your application. This means that Firebase itself acts as an authority and can tell that an incoming application looks like one that you’ve made.
When your application tries to use any Firebase service on Android, Firebase’s servers confirm that two things are true:
- the application ID matches one of the applications in your project.
- the SHA-1 of of the signed game or application matches a SHA-1 that the developer uploaded to the Firebase project’s console.
This has an interesting side effect that a combination of package id and the SHA-1 are used to match a game or application with a Firebase project. Because of this, you cannot have two Firebase projects that contain the same package id and signing signature. It is expected that you’ll use the same development SHA-1 across many projects, but if you ever see An OAuth2 client already exists for this package name and SHA-1 in another project , you’ll want to ensure that your package name is unique.
Wrap Up
Go ahead and finish setting up Firebase with Android, Unity, or whatever else you needed a keytool to unlock. And don’t forget to run through this checklist when you’re ready to ship. You’ll probably see keytool surface once again when you’re ready to sign a release build.
Источник
создать хранилище ключей:
создать запрос подписи сертификата (CSR):
Я ухожу с моим хостинг-провайдера и получить сертификаты. Эти я установил следующим образом:
когда я установил окончательный сертификат (мой.crt) я получил следующую ошибку:
Я считаю, что я импортировал цепь и в правильном порядке, поэтому я очень смущен этим сообщением. Кто-нибудь видит, что я делаю не так?
6 ответов
Я только что обнаружил, что файлы godaddy, поставляемые с моим сертификатом, являются промежуточными сертификатами (на самом деле они кажутся одинаковыми промежуточными сертификатами).
Я получил правильный корневой и промежуточный сертификаты, дважды щелкнув по моему сертификату и глядя на путь сертификата. отсюда я также могу загрузить каждый из этих сертификатов и использовать шаги, используемые в вопросе, чтобы импортировать их
я боролся с той же проблемой около двух недель, пока не нашел способ обойти ее. Проблема была в том, что корневые и промежуточные сертификаты, которые пришли с моим сертификатом от Godaddy, не были теми, которые мне нужны. Я много раз заглядывал в репозиторий Godaddy, не найдя подходящих сертификатов.
Я просмотрел свой сертификат на своем ноутбуке (используя Windows 8.1). Там я увидел цепочку сертификатов, и я смог экспортировать корневые и промежуточные сертификаты. Тогда Я импортировал их в мое хранилище ключей, и он работал так, как должен.
для этого выполните следующие действия:
Просмотр сертификатов на компьютере под управлением Windows. Вы сможете увидеть цепочку сертификатов на третьей вкладке, которая выглядит следующим образом.
выберите корневой сертификат из цепочки и нажмите на кнопку «Просмотреть сертификат».
Примечание.: Прежде чем импортировать эти сертификаты, мне пришлось удалить те, которые были на моем хранилище ключей и не работали. Для этого я использовал следующие инструкции:
Если вы не уверены, что находится внутри вашего keytool, вы можете просмотреть с помощью:
Я получил ту же ошибку при попытке импортировать сертификаты CA certified в хранилище ключей в среде Linux.
Я выполнил набор шагов и успешно импортировал его.
после получения сертификатов CA certified выполните следующие действия для импорта сертификатов в хранилище ключей.
Шаг 1:
импортируйте корневой сертификат в cacerts, который будет доступен в папке JAVA_HOME/jre/lib/security, используя следующее команда:
после того, как вы введете выше команду он будет запрашивать пароль, введите пароль и нажмите на да.
Шаг 2:
импорт корневого сертификата с помощью следующей команды:
после того, как вы введете выше команду он будет запрашивать пароль, введите пароль и нажмите на да.
Шаг 3:
импорт промежуточного сертификата с помощью следующей команды:
как только вы введете над командой его подскажет для замены уже сертификата введите yes.
Примечание: промежуточный сертификат опционный можно проигнорировать, он приходит с сертификатом корня.
Шаг 4:
импорт сертификата сайта с помощью следующей команды:
Environment выполняются эти команды java версии 7. сертификат выдается GODADDY.
чтобы решить эту проблему, используют дополнительный переключатель (-trustcacerts) в командах keytool.
команда для импорта промежуточных сертификатов из промежуточного.файл cer для сертификатов.KS файл ключей должен выглядеть так:
keytool-storetype JCEKS-storepass passwd-сертификаты хранилища ключей.КС-импорт -псевдоним промежуточными -trustcacerts -файл промежуточными.cer
команда для импорта сертификата из http.файл cer для сертификатов.KS файл ключей должен выглядеть так:
keytool-storetype JCEKS-storepass passwd-сертификаты хранилища ключей.KS-import-псевдоним http -trustcacerts -файл http.cer
повторная попытка завершить процесс создания и импорта подписанного SSL-сертификата.
загрузите цепочку сертификатов, откройте ее в Windows — она хранит сертификат CA и ваш ответ сертификата от CA.
сначала импортируйте сертификат CA в хранилище ключей, а затем импортируйте ответ из CA.
следующий шаг очень важен перед импортом сертификатов в локальное хранилище ключей. После получения подписанных сертификатов от CA).
импортируйте корневой сертификат в cacerts, который будет доступен в папке JAVA_HOME/jre/lib/security, используя следующую команду:
keytool-importcert-псевдоним корневой файл [корневой сертификат] — keystore cacerts после того, как вы введете выше команду он будет запрашивать пароль, введите пароль и нажмите на да.
Источник
Файл хранилища ключей не существует
Я пытаюсь получить отпечаток SHA1, чтобы получить ключ Google API. Им в следующем каталоге:
/ Library / Java/JavaVirtualMachines / jdk1.8.0_20.jdk/содержание/главная / bin
затем я выполняю команду с сайта google:
keytool-list-v-keystore mystore.хранилища ключей
но это дает эту ошибку:
я следовал учебникам, но я не могу заставить его работать! Кто-нибудь знаешь, что я делаю не так?
кстати: я использую Macbook Pro с Xamarin Studio 5.5.2.
7 ответов
Вы сказали, что выполняете команду from.
ваш файл keystore в этот каталог, а? Если нет, то вам нужно указать путь к файлу хранилища ключей, например
используется хранилище должна использоваться для входа в приложение. Для отладочных сборок Xamarin это будет хранилище ключей отладки, расположенное по адресу /Users/[USERNAME]/.local/share/Xamarin/Mono for Android/debug.keystore . Команда на OSX для этого будет.
или в Windows 7
команда Linux & Mac
даст вам SHA1, SHA256, MD5 для ключа отладки по умолчанию. И его можно использовать для разработки и отладки с помощью сервисов google play.
пожалуйста, укажите полный путь отладки.хранилище ключей. Пример: C:/Users/myusername/.android / отладка.хранилище ключей вместо
/.android / отладка.хранилища ключей
я столкнулся с той же проблемой, но решил с помощью следующей команды:
OS: Windows 7
для моего случая debug.keystore генерируется после первого запуска приложения на Android Studio
последнее обновление для Mac & Ubuntu
Я нашел это руководство от teamtreehouse форум. надеюсь, это вам поможет.
1) Открыть Командная Строка при нажатии Пуск+R и набрав cmd.исполняемый.
2) с помощью Проводник Windows, найди там свой JDK каталог находится (обычно Program Files > > Java) и копирует путь.
3) в Командная Строка, введите cd, а затем каталог каталога bin вашего JDK. е.г: компакт-диск C:Program файлыJavajdk1.8.0_25bin-это команда, которую я использую (Ваша может отличаться).
4) Используя Проводник Windows, найдите где ваш .каталог android находится (обычно в разделе Пользователи >> [YOUR WINDOWS USERNAME] ) и скопировать путь.
5) теперь используйте следующую команду:
замена [PATH_TO_.ANDROID_DIRECTORY] С копируемым путем. Обратите внимание, что вы должны запустить эту команду в терминале/командной строке в каталоге bin вашего JDK (вы сделали это на Шаге 3).
шахты C:Program FilesJavajdk1.8.0_121bin>keytool -exportcert -alias androiddebugkey -keystore C:UsersHoSiLuan.androiddebug.keystore -list -v
не забывайте использовать C:UsersHoSiLuan.androiddebug.keystore вместо
/.androiddebug.keystore . Я все еще получил ошибку, когда введите этот укороченный способ.
затем вам будет предложено ввести пароль как обычно, который вы можете ввести (пароль android) . После этого вы увидите список сертификатов, напечатанных на экране.
Источник