nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

Feature Request: netrc setup

Open blaggacao opened this issue 1 year ago • 2 comments

In order to seamlessly use this installer in a private repository setup (without extra setup instructions), would you consider to expand the functionality to such a typical installation scenario and make that easier?

Currently, I'm doing a very hacky:

  setup_netrc() {
    log To access potentially private repositories, we need to set up you netrc file
    log "Current contents:"
    log "$(cat ~/.netrc)"
    log Please enter your github user name:
    read -rp 'GH User(handle): ' ghuser
    log Please enter your github user name:
    read -rsp 'GH Private Access Token (https://github.com/settings/tokens/new with full "repo" scope) :' ghpat
    cat >>~/.netrc <<<"machine github.com login ${ghuser} password ${ghpat}"
    cat >>~/.netrc <<<"machine api.github.com login ${ghuser} password ${ghpat}"
    log "New contents:"
    log "$(cat ~/.netrc)"
  }

This is fine, but it's also sign of a gap in one typical use case of the installer.

blaggacao avatar Apr 17 '23 20:04 blaggacao

Hi @blaggacao, I think that's a good suggestion! We'll try to get an implementation.

Hoverbear avatar Apr 20 '23 14:04 Hoverbear

Any progress on this? My colleagues constantly trip up when setting up nix due to forgetting to set up access tokens

ryanswrt avatar May 06 '24 08:05 ryanswrt