Skip to content

Support passing github credentials if remote repository requires authentication #430

@awangc

Description

@awangc

Is your feature request related to a problem? Please describe.
I'm trying to use weaver's -r option to point to a repository that is hosted on github.com but via an enterprise account requiring authentication. When generating artifacts it prompts for username and password, which prevents the tool from being used in automation pipeline directly (needs to wrap it around something like tmux)

Describe the solution you'd like
a way to pass credentials (username and password) so repositories can be accessed: specific environment variables or CLI args would be good

Describe alternatives you've considered
I've tried authenticating via gh auth login, adding git config credential.helper , setting GITHUB_TOKEN env var, but i still run into the prompt

Wrapping the weaver command around tmux works.

tmux new-session -d -s "weaver" "weaver registry generate -r https://github.com/<path-to-repository> ..."
tmux send-key -t weaver: $GHEC_USER "Enter"
tmux send-key -t weaver: $GHEC_PASS "Enter"

But this feels an extra step that could be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions