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

Authentication for sources in azd template source #2996

Open
lechnerc77 opened this issue Nov 16, 2023 Discussed in #2960 · 1 comment
Open

Authentication for sources in azd template source #2996

lechnerc77 opened this issue Nov 16, 2023 Discussed in #2960 · 1 comment
Labels
Milestone

Comments

@lechnerc77
Copy link
Contributor

Discussed in #2960

Originally posted by lechnerc77 November 12, 2023
We can change the list of available template sources via azd template source add. Assuming I want to add my custom source I can define a JSON and reference it via e.g.:

azd template source add my-source --type url --location https://raw.githubusercontent.com/lechnerc77/azd-festive-tech-calendar-2023/main/custom_template/dapr_template.json

How can I use this command and access private GitHub repositories that require authentication?

Following up this discussion and the answer by @wbreza I open this issue as a feature request for enhancing azd template sources for defining the sources behind endpoints that need authentication like private GitHub repositories

Scenario: company maintains their own curated list of sources for azd. The list of the sources as well as the sources are available in private repositories only.

@vhvb1989
Copy link
Member

We should be able to use gh cli within azd to download the file.

Same way we do for pipeline config, if the gh cli is not logged in, azd runs the login flow. Once logged in, we can use the github api to download the file.
See: https://stackoverflow.com/questions/18126559/how-can-i-download-a-single-raw-file-from-a-private-github-repo-using-the-comman#:~:text=A%20simpler%20solution%20is%20to%20use%20Official%20GitHub,to%20download.%20And%20call%20gh%20to%20download%20it%3A

@rajeshkamal5050 rajeshkamal5050 added this to the Backlog milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants