asc auth
Manage App Store Connect API authentication.
Commands
login
Configure authentication credentials interactively or via options.
asc auth login
asc auth login --issuer-id XXX --key-id YYY --key-path ~/.asc/key.p8
Options:
| Option | Short | Description |
|---|---|---|
--issuer-id | -i | App Store Connect Issuer ID |
--key-id | -k | API Key ID |
--key-path | -p | Path to .p8 private key file |
--profile | Profile name for multiple accounts |
Examples:
# Interactive setup
asc auth login
# Non-interactive (for scripts)
asc auth login \
--issuer-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--key-id XXXXXXXXXX \
--key-path ~/.config/asc-cli/AuthKey.p8
# Create named profile
asc auth login --profile work
status
Check current authentication status.
asc auth status
Output:
Authentication Status: Configured
Profile: default
Issuer ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Key ID: XXXXXXXXXX
Key Path: ~/.config/asc-cli/AuthKey_XXXXXXXXXX.p8
Key Valid: Yes
test
Test the API connection by listing apps.
asc auth test
Output:
✓ Authentication successful
✓ Connected to App Store Connect
✓ Found 3 apps in your account
logout
Remove stored credentials.
asc auth logout
asc auth logout --profile work
Options:
| Option | Short | Description |
|---|---|---|
--profile | Profile to remove | |
--all | Remove all profiles |
use
Switch active profile.
asc auth use work
Environment Variables
You can also configure authentication via environment variables:
export ASC_ISSUER_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
export ASC_KEY_ID="XXXXXXXXXX"
export ASC_PRIVATE_KEY_PATH="~/.config/asc-cli/AuthKey.p8"
Or provide the key content directly (useful for CI):
export ASC_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----"
Credential Priority
Credentials are checked in this order:
- Command-line options
- Environment variables
- Profile specified with
--profile - Default profile in config file
Common Workflows
First-Time Setup
# 1. Download .p8 from App Store Connect
# 2. Store securely
mkdir -p ~/.config/asc-cli
mv ~/Downloads/AuthKey_*.p8 ~/.config/asc-cli/
# 3. Configure
asc auth login
# 4. Verify
asc auth test
CI/CD Setup
# Set secrets in your CI provider, then:
ASC_ISSUER_ID=${{ secrets.ASC_ISSUER_ID }} \
ASC_KEY_ID=${{ secrets.ASC_KEY_ID }} \
ASC_PRIVATE_KEY="${{ secrets.ASC_PRIVATE_KEY }}" \
asc auth test