Skip to content

gh aw init fails with "not in a git repository" on macOS ARM64 (Apple Silicon) #30841

@anthonymastreanvae

Description

@anthonymastreanvae

Description

gh aw init and gh aw add-wizard fail with "not in a git repository" on macOS ARM64 (Apple Silicon M5 Max). The error occurs in every git repository, including freshly created ones.

Environment

  • OS: macOS (Apple Silicon M5 Max, arm64)
  • gh version: gh from /usr/local/bin/gh
  • gh-aw version: v0.71.5
  • git version: 2.50.1 (Apple Git-155)
  • Binary architecture: gh-aw binary is Mach-O 64-bit executable x86_64 (running under Rosetta)
  • GHE instance: *.ghe.com

Reproduction

# In any valid git repo
cd /tmp && git init test-repo && cd test-repo
git commit --allow-empty -m "init"
git remote add origin https://github.com/octocat/Hello-World.git

# Fails
gh aw init

# Also fails with GHE
GH_HOST=itpie.ghe.com gh aw init

Observed behavior

🚀 Welcome to GitHub Agentic Workflows!

This tool will initialize your repository for GitHub Agentic Workflows.

ℹ Setting up repository...

✗ not in a git repository

Expected behavior

gh aw init should detect the git repository and proceed with setup.

Investigation

  • git rev-parse --git-dir returns .git successfully
  • .git/ is a real directory (not a worktree file)
  • git status shows a valid repo on branch main
  • The failure reproduces in every git repository, including fresh git init repos
  • The gh-aw binary is x86_64-only, running under Rosetta 2 on arm64
  • No native ARM64 build is distributed

Likely cause

The binary embeds the string not in a git repository or git command failed: %w, suggesting it uses an embedded Go git library (likely go-git) rather than shelling out to /usr/bin/git. Something in the git detection path fails silently under Rosetta or on macOS ARM64 specifically.

Related


Generated with GitHub Copilot

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions