-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for setting customg it auth
By default git auth supports some default secret values for fetching auth credentials (`GIT_AUTH_TOKEN` and `GIT_AUTH_HEADER`). This change allows customizing that to different secret names. Signed-off-by: Brian Goff <[email protected]>
- Loading branch information
Showing
6 changed files
with
150 additions
and
5 deletions.
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
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
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
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
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
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 |
---|---|---|
|
@@ -70,12 +70,31 @@ You can override this behavior by setting `keepGitDir: true` in the git configur | |
|
||
Git repositories are considered to be "directory" sources. | ||
|
||
Authentication will be handled using some defaults: | ||
Authentication will be handled using some default secret names which are fetched | ||
from the client: | ||
|
||
1. Local SSH agent | ||
1. Default SSH agent | ||
2. Providing a build secret called `GIT_AUTH_HEADER` for header based auth | ||
3. Providing a build secret called `GIT_AUTH_TOKEN` for token based auth | ||
|
||
You can customize each of these by setting the appropriate field in the | ||
git auth section (shown below with default values): | ||
|
||
```yaml | ||
someSource1: | ||
git: | ||
# This uses an SSH style git URL. | ||
url: [email protected]:myOrg/myRepo.git | ||
commit: 1234567890abcdef | ||
auth: | ||
header: GIT_AUTH_HEADER # Default header secret used | ||
token: GIT_AUTH_TOKEN # Default token secret used | ||
ssh: default # Default SSH secret used | ||
``` | ||
|
||
Note: These are secret names which are used to reference the secrets provided | ||
by the client, not the actual secret values. | ||
|
||
### HTTP | ||
|
||
HTTP sources fetch a file from an HTTP URL. | ||
|