mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 15:45:48 +03:00
[PR #19] [MERGED] fix: prioritize keychain over env vars for credentials #231
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/19
Author: @rudrankriyam
Created: 1/20/2026
Status: ✅ Merged
Merged: 1/20/2026
Merged by: @rudrankriyam
Base:
main← Head:fix/keychain-priority-over-env📝 Commits (1)
4501c2dfix: prioritize keychain over env vars for credentials📊 Changes
1 file changed (+18 additions, -19 deletions)
View changed files
📝
cmd/commands.go(+18 -19)📄 Description
Summary
The credential resolution in
getASCClient()was incorrectly checking environment variables first and only falling back to keychain when env vars were missing. This violated the documented behavior in AGENTS.md where credentials set viaasc auth loginshould take precedence.Problem: Users who authenticated with
asc auth login(storing credentials in keychain) were unexpectedly using credentials from staleASC_*env vars in their.zshrc/.bashrc.Fix: Swap the credential resolution order:
asc auth login)Test Plan
make testpasses (all 58 tests)go fmt ./...cleanBreaking Change?
No. Users relying on env var overrides can still use them by clearing their keychain credentials (
asc auth logout). The new behavior matches the documented intent in AGENTS.md.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.