Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read private repo credentials from a the netrc file #990

Merged
merged 4 commits into from
Jun 14, 2022
Merged

Read private repo credentials from a the netrc file #990

merged 4 commits into from
Jun 14, 2022

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Jun 14, 2022

Motivation

Add support for Tapioca to read credentials from a netrc file (defaulting to ~/.netrc).

Given these lines in your netrc:

machine raw.githubusercontent.com
  login $USERNAME
  password $TOKEN

Where $USERNAME is your Github username and $TOKEN is a personal access token. Then run Tapioca with the --netrc option (enabled by default).

The --netrc-file option can be specified to read another file than ~/.netrc:

$ bin/tapioca annotations --netrc-file /path/to/my/netrc/file

If the --netrc-file isn't specified, Tapioca will first try to find the netrc file from the environment by reading the TAPIOCA_NETRC_FILE variable then from ~/.netrc:

$ TAPIOCA_NETRC_FILE=/path/to/my/netrc/file bin/tapioca annotations

Closes #964.

Implementation

Tests

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar added the enhancement New feature or request label Jun 14, 2022
@Morriar Morriar requested a review from a team June 14, 2022 18:28
@Morriar Morriar self-assigned this Jun 14, 2022
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
lib/tapioca/cli.rb Outdated Show resolved Hide resolved
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar merged commit b04cdd3 into main Jun 14, 2022
@Morriar Morriar deleted the at-netrc branch June 14, 2022 22:25
@shopify-shipit shopify-shipit bot temporarily deployed to production July 7, 2022 17:53 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

annotations command should read authentification from the user's netrc file
2 participants