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

Support passing github credentials if remote repository requires authentication #430

Open
awangc opened this issue Oct 24, 2024 · 0 comments

Comments

@awangc
Copy link

awangc commented Oct 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant