Skip to content

[BUG] apm does not respect the default branch #573

@srid

Description

@srid

Describe the bug
When a repo uses anything but main as the branch name, apm install fails because it is hardcoded to use master.

To Reproduce


srid on pureintent AI on  main [!?] via λ 
❯ cat apm.yml 
name: AI
version: 1.0.0
type: hybrid

dependencies:
  apm:
    - srid/agency

srid on pureintent AI on  main [!?] via λ 
❯ uvx --from git+https://github.com/microsoft/apm apm install
[>] Installing dependencies from apm.yml...

-- Diagnostics --
  [x] 1 package failed:
    +- srid/agency -- Failed to install srid/agency: Failed to clone repository srid/agency 
using all available methods. Please check repository access permissions and authentication 
setup. Last error: Cmd('git') failed due to: exit code(128)
  cmdline: git clone -v --depth=1 --branch=main -- https://github.com/srid/agency 
/tmp/tmpvtngir8z
  stderr: 'Cloning into '/tmp/tmpvtngir8z'...
POST git-upload-pack (338 bytes)
fatal: Remote branch main not found in upstream origin
'

[x] Installation failed with 1 error(s).

srid on pureintent AI on  main [!?] via λ 
❯ 

Expected behavior

It succeeds.

Environment (please complete the following information):

  • OS: macOS
  • Python Version: uvx 0.11.0 (x86_64-unknown-linux-gnu)
  • APM Version: from git (see uvx command above)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNew issue, not yet reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions