Skip to content

Verify gh CLI authentication before upload #44

Closed

Description

@neuromechanist

Summary

The upload workflow requires that the gh CLI is authenticated as the correct GitHub user (matching the NEMAR user's linked GitHub account). If mismatched, the invitation auto-accept and push will fail.

Solution

Before upload, verify:

  1. gh CLI is installed and authenticated
  2. The authenticated user matches the NEMAR user's linked GitHub account

Implementation

# Check gh auth status
gh auth status

# Get authenticated user
GITHUB_USER=$(gh api user --jq '.login')

# Compare with NEMAR user's linked GitHub
if [ "$GITHUB_USER" != "$EXPECTED_GITHUB_USER" ]; then
  echo "Warning: gh CLI authenticated as $GITHUB_USER, expected $EXPECTED_GITHUB_USER"
fi

Considerations

  • Add verification step at start of upload command
  • Warn user if mismatch detected
  • Suggest gh auth login if not authenticated
  • May need to store linked GitHub username in NEMAR config

Parent Issue

Part of #41

Activity

  1. neuromechanist commented on Jan 21, 2026

    @neuromechanist
    ContributorAuthor

    Closing: created empty due to shell quoting error. Replaced by #47.

  2. added 2 commits that reference this issue on Jan 21, 2026
    08e2910
    b474af7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions