Repository navigation
Introduce httpAuthUsername - #10605
Conversation
Previously, when calling dagger modules from a remote HTTP ref, only the password/token was passed. However, in some situations (e.g., when using CI_JOB_TOKENs with GitLab CI), a specific username must be used for basic authorization. Instead of just passing the token, we now use the existing authHeader interface to pass a formatted basic auth string that includes the username received from the git credential helper. Signed-off-by: Manuel Leonhardt <[email protected]>
…tp auth" This reverts commit 928fb62b9c5571860c3153f63f4ecfe4c63abfc9.
This introduces an httpAuthUsername field to the core/git API. Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Manuel Leonhardt <[email protected]>
21a6c2d to
56cc4b0
Compare
|
DCO complained about the revert commit not being signed-off. I suggest removing these commits since they have no functional impact. |
jedevc
left a comment
There was a problem hiding this comment.
Couple of tiny nits, otherwise looks perfect! Thanks!
Any chance you could add a changelog entry using changie new?
|
|
||
| AuthToken dagql.Instance[*Secret] | ||
| AuthHeader dagql.Instance[*Secret] | ||
| AuthUsername dagql.String |
There was a problem hiding this comment.
nit: can just be
| AuthUsername dagql.String | |
| AuthUsername string |
There was a problem hiding this comment.
Done to my best knowledge in top-most commit. This also required changing the API (changing the default value from nil to ""). Please have a look.
| Value: dagql.Opt(dagql.NewID[*core.Secret](authToken.ID())), | ||
| }, | ||
| } | ||
| // Omit blank username; adding it would change the selector hash and kill cache hits. |
There was a problem hiding this comment.
nit: I would remove this comment, up to you! It follows a similar pattern as the surrounding code, don't know if it needs to be specifically called out.
This file should not be committed. See #10425. Signed-off-by: Manuel Leonhardt <[email protected]>
Signed-off-by: Manuel Leonhardt <[email protected]>
Signed-off-by: Manuel Leonhardt <[email protected]>
Signed-off-by: Manuel Leonhardt <[email protected]>
1e64ff5 to
4a7e345
Compare
|
As far as I can tell, this only adds the internal capability of the I am trying to clone private repositories in GitLab with the CI_JOB_TOKEN (I don't want to create a long-lived SSH key), with the following .gitlab-ci.yaml example |
You're right - funny we missed that. My initial commit already had this, but the part where we initialize |
Thank you 🙏 My bad ahah |
Continuation of #10427.