Skip to content

Private-CLI installers silently rewrite global git config (HTTPS→SSH insteadOf), duplicated 4x #95

Description

@PascalTemel

Installing any of the four private Go CLIs silently mutates global git config:

git config --global url."git@github.com:".insteadOf "https://github.com/"

Present, copy-pasted, in all four installers: atl.js:90-104, n8n.js:100-116, esq.js:84-115, discord.js:73-104 (two execSync-based, two spawnSync-based — the duplication has already drifted stylistically).

Effects: every GitHub HTTPS remote on the machine is rewritten to SSH from then on — including unrelated personal repos and tooling that relies on HTTPS + credential manager — and a pre-existing, different insteadOf value is overwritten without warning.

Proposal

  • Scope the rewrite to the single go install invocation instead of the machine: GIT_CONFIG_COUNT/GIT_CONFIG_KEY_0/GIT_CONFIG_VALUE_0 env vars (or GOFLAGS/GOPRIVATE + git -c equivalent) on the spawned process.
  • If a global rewrite is genuinely desired, ask first and never overwrite an existing differing value.
  • Extract the 4 copies into one shared helper while touching this.

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