Skip to content

Commit

Permalink
Merge pull request #108 from LambdaTest/beta-sync-31-03-2022-part-2
Browse files Browse the repository at this point in the history
Syncing beta with latest dev changes
  • Loading branch information
saurabh-prakash committed Mar 31, 2022
2 parents 624c8cd + b2b9c5d commit ad96956
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/gitmanager/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ func (gm *gitManager) initGit(ctx context.Context, payload *core.Payload, oauth
creds := strings.Split(string(decodedToken), ":")
repoURL.User = url.UserPassword(creds[0], creds[1])
} else {
repoURL.User = url.UserPassword("oauth2", oauth.Data.AccessToken)
repoURL.User = url.UserPassword("x-token-auth", oauth.Data.AccessToken)
if payload.GitProvider == core.GitLab {
repoURL.User = url.UserPassword("oauth2", oauth.Data.AccessToken)
}
}

urlWithToken := repoURL.String()
Expand Down

0 comments on commit ad96956

Please sign in to comment.