#how do i pass credentials to dag.Git using GithubToken
1 messages · Page 1 of 1 (latest)
cloned, err := newGitContainer().
// Terminal().
WithSecretVariable("ACCESS_TOKEN", it.GithubToken).
FTR this is how i pass credentials to the git binary now.
how do i pass credentials to dag.Git using GithubToken
gitsha, err := dag.
Git(conf.repo.giturl).
WithAuthToken(it.GithubToken).
Branch(conf.gitbr).
Commit(context.Background())
if err != nil {
return err
}
this is what i found is this correct ?
is it possible to not cache it ? i think i am hitting the cache and i cant figure how to tell it not to cache this request
i think i need to pass the user but so far i cant tell how even after looking at the pr
all i needed was to get to get the git sha as you kindly suggested previously. and once i set the github token it actually worked ! unfortunately using the dag.Git api does not seem to be documented. did i miss it ?
Oh, you're right. I'm glad it worked 🙌
forgot to ask. is it garanteed that this will not be cached ? i am starting to think i am hitting the cache and i cant see how to make sure the above is always executed
yes, dag.Git will only use the cache if the ref that branch you're specifying is the same