Fix bug when refresh gitea access token
When the URI has extra '/' in DRONE_GITEA_SERVER, the drone
will not pull the repo since it cannot refresh the access token.
The log in gitea shows the drone try to access '//login/oauth/access_token'
Related to commit 5414bb75f
This commit is contained in:
parent
1ddf7963fe
commit
3e74e30845
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
|
|||
return &oauth2.Refresher{
|
||||
ClientID: config.Gitea.ClientID,
|
||||
ClientSecret: config.Gitea.ClientSecret,
|
||||
Endpoint: config.Gitea.Server + "/login/oauth/access_token",
|
||||
Endpoint: strings.TrimSuffix(config.Gitea.Server, "/") + "/login/oauth/access_token",
|
||||
Source: oauth2.ContextTokenSource(),
|
||||
Client: defaultClient(config.Gitea.SkipVerify),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue