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 repository credentials from environment #632
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
92f6405
Add support for provate feed credentials
6fd8c32
Merge pull request #2 from kishoreinvits/feature/privatefeedcredentia…
kishoreinvits 562b01d
Merge branch 'main' into merge-17062021
kishoreinvits fe5a670
Renaming PRIVATE_REPOSITORIES to PRIVATE_REGISTRY_CREDENTIALS
kishoreinvits File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,29 @@ BITBUCKET_HOSTNAME | `bitbucket.org` | |
|
||
\* Either `BITBUCKET_ACCESS_TOKEN` must be passed, or `BITBUCKET_APP_USERNAME` and `BITBUCKET_APP_PASSWORD`. | ||
|
||
**Private registry credentials** | ||
|
||
Variable | Default | ||
:------ | :------ | ||
PRIVATE_REGISTRY_CREDENTIALS | N/A (Optional) | ||
|
||
This variable takes a JSON array with objects having below properties. | ||
Json Property | Description | ||
:------ | :------ | ||
type | Repository type. Currently supports `nuget_feed`, `npm_registry`, `rubygems_server`, `python_index` | ||
url | Repository URL. One that is configured in your feed config in your git repository | ||
token | Token with read access to your repository | ||
|
||
|
||
Example: | ||
```bash | ||
export PRIVATE_REGISTRY_CREDENTIALS="[{\"type\":\"REPO_TYPE_1\",\"url\":\"REPO_URL_1\",\"token\":\"TOKEN_1\"},{\"type\":\"REPO_TYPE_2\",\"url\":\"REPO_URL_2\",\"token\":\"TOKEN_2\"}]" | ||
``` | ||
|
||
Limitations: | ||
- `python_index` works but currently you cannot set `replaces-base`. | ||
- `maven_repository`, `docker_registry` uses username/password instead of token. Hence it is not supported. If this feature is of value, this functionality can be extended. | ||
Comment on lines
+134
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing to the strategy mentioned above would remove this limitation. |
||
|
||
### Running dependabot | ||
|
||
There are a few ways of running the script: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all credentials work this way - I don't think you need to limit yourself by specifying exactly how the JSON should be structured. For example, the way Hex organisation credentials are used is here.