Can't store credentials using notary tool

When I try to store my credentials using the notary tool, I get the following:

 /Applications/Xcode.app/Contents/Developer/usr/bin/notarytool store-credentials  --verbose
[00:44:33.975Z] Debug [MAIN] Running notarytool version: 1.0.0 (27), date: 2023-10-03T00:44:33Z, command: /Applications/Xcode.app/Contents/Developer/usr/bin/notarytool store-credentials --verbose

This process stores your credentials securely in the Keychain. You reference these credentials later using a profile name.

Profile name:
build
We recommend using App Store Connect API keys for authentication. If you'd like to authenticate with an Apple ID and app-specific password instead, leave this unspecified.

Path to App Store Connect API private key:
./private_keys/AuthKey_QHBB38VH7L.p8
App Store Connect API Key ID:
storieddata
App Store Connect API Issuer ID:
69a6de6f-872e-47e3-e053-5b8c7c11a4d1
Validating your credentials...
[00:45:08.825Z] Info [API] Initialized Notary API with base URL: https://appstoreconnect.apple.com/notary/v2/
[00:45:08.826Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/test?, Parameters: [:], Custom Headers: private<Dictionary<String, String>>
[00:45:08.827Z] Debug [JWT] Generating new JWT for key ID: storieddata.
[00:45:08.829Z] Info [JWT] Caching newly generated JWT. key ID: storieddata, JWT: private<String>
[00:45:08.830Z] Debug [AUTHENTICATION] Authenticating request with App Store Connect API credentials. Key ID: storieddata, Issuer ID: 69a6de6f-872e-47e3-e053-5b8c7c11a4d1
[00:45:08.831Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[00:45:09.243Z] Debug [API] **Received response status code: 401, message: unauthorized, URL: https://appstoreconnect.apple.com/notary/v2/test?,** Correlation Key: ZYHO7EDNX52XJBTRMIOUWGIVZI
[00:45:09.244Z] Error [API] Received non-JSON response body from Notary API, URL: https://appstoreconnect.apple.com/notary/v2/test?
[00:45:09.245Z] Error [TASKMANAGER] Completed Task with ID 1 has encountered an error.
[00:45:09.246Z] Debug [TASKMANAGER] Ending Task Manager loop.
Credential validation failed. Please verify your inputs.


I have double checked the input, and everything is correct.

The issue here isn’t that your can’t store the credentials, it’s that notarytool has checked your credentials and noticed that they’re invalid. That’s what this message means:

Credential validation failed. Please verify your inputs.

And the reason for that is that you’re trying to authenticate with a App Store Connect API key but you’ve supplied a bogus key ID (storieddata). A key ID is meant to be a 10-digit alphanumeric, like T9GPZ92M7K. You get this from App Store Connect when you create your key.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks, it works now.

Can't store credentials using notary tool
 
 
Q