mirror of
https://github.com/harness/drone.git
synced 2025-05-03 21:11:08 +08:00
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
@ -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 New Issue
Block a user