Skip to content

Commit

Permalink
Support Basic Auth for GitHub again
Browse files Browse the repository at this point in the history
  • Loading branch information
joan38 committed Nov 20, 2024
1 parent 26c80c7 commit 54a5506
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ object ForgeAuthAlg {
config.gitCfg.gitAskPass
)
case GitHub =>
val gitHub =
config.githubApp.getOrElse(
throw new IllegalArgumentException("GitHub app configuration is missing")
)
new GitHubAuthAlg(config.forgeCfg.apiHost, gitHub.id, gitHub.keyFile)
config.githubApp match {
case Some(gitHub) => new GitHubAuthAlg(config.forgeCfg.apiHost, gitHub.id, gitHub.keyFile)
case None =>
new BasicAuthAlg(
config.forgeCfg.apiHost,
config.forgeCfg.login,
config.gitCfg.gitAskPass
)
}
case GitLab =>
new GitLabAuthAlg(config.forgeCfg.apiHost, config.forgeCfg.login, config.gitCfg.gitAskPass)
case Gitea =>
Expand Down

0 comments on commit 54a5506

Please sign in to comment.