Skip to content

Commit e3edf39

Browse files
avoid prompting for git creds on CI (#3778)
1 parent f3b81f1 commit e3edf39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/new.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2727,7 +2727,10 @@ end
27272727
#
27282728
# Note: these tests should be run on clean depots
27292729
for v in (nothing, "true")
2730-
withenv("JULIA_PKG_USE_CLI_GIT" => v, "GIT_TERMINAL_PROMPT" => 0) do
2730+
# On CI when JULIA_PKG_USE_CLI_GIT=true we need to tell the cli git to not prompt for credentials
2731+
# GIT_ASKPASS=true forces the credential provider to return "" https://stackoverflow.com/a/71057440
2732+
# GIT_TERMINAL_PROMPT=0 is also supposed to avoid the prompt but doesn't reliably https://github.com/JuliaLang/Pkg.jl/issues/3774
2733+
withenv("JULIA_PKG_USE_CLI_GIT" => v, "GIT_TERMINAL_PROMPT" => 0, "GIT_ASKPASS" => "true") do
27312734
@testset "downloads with JULIA_PKG_USE_CLI_GIT = $v" begin
27322735
isolate() do
27332736
@testset "via name" begin

0 commit comments

Comments
 (0)