Skip to content

Commit ad70f55

Browse files
authored
Don't request username in init_jll_package (#1304)
The username might not be available if authentication as a GitHub App.
1 parent 88e1a88 commit ad70f55

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/AutoBuild.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,7 @@ end
10571057

10581058
# Init remote repository, and its local counterpart
10591059
function init_jll_package(code_dir, deploy_repo;
1060-
gh_auth = Wizard.github_auth(;allow_anonymous=false),
1061-
gh_username = gh_get_json(DEFAULT_API, "/user"; auth=gh_auth)["login"])
1060+
gh_auth = Wizard.github_auth(;allow_anonymous=false))
10621061
url = "https://github.com/$(deploy_repo)"
10631062
try
10641063
# This throws if it does not exist
@@ -1086,13 +1085,13 @@ function init_jll_package(code_dir, deploy_repo;
10861085
if !isdir(code_dir)
10871086
# If it does exist, clone it down:
10881087
@info("Cloning wrapper code repo from $(url) into $(code_dir)")
1089-
Wizard.with_gitcreds(gh_username, gh_auth.token) do creds
1088+
Wizard.with_gitcreds("x-access-token", gh_auth.token) do creds
10901089
LibGit2.clone(url, code_dir; credentials=creds)
10911090
end
10921091
else
10931092
# Otherwise, hard-reset to latest main:
10941093
repo = LibGit2.GitRepo(code_dir)
1095-
Wizard.with_gitcreds(gh_username, gh_auth.token) do creds
1094+
Wizard.with_gitcreds("x-access-token", gh_auth.token) do creds
10961095
LibGit2.fetch(repo; credentials=creds)
10971096
end
10981097
main_branch = LibGit2.lookup_branch(repo, "origin/main", true)

0 commit comments

Comments
 (0)