mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 09:58:29 +02:00
use token auth for https remotes (#275)
use token for https auth instead of user name also handle http urls Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/275 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: 6543 <6543@obermui.de> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
@ -60,7 +60,7 @@ func PullCheckout(login *config.Login, repoOwner, repoName string, index int64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
auth, err := local_git.GetAuthForURL(url, login.User, login.SSHKey)
|
||||
auth, err := local_git.GetAuthForURL(url, login.Token, login.SSHKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ call me again with the --ignore-sha flag`, pr.Head.Ref)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
auth, err := local_git.GetAuthForURL(url, login.User, login.SSHKey)
|
||||
auth, err := local_git.GetAuthForURL(url, login.Token, login.SSHKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user