File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -30,5 +30,24 @@ mktempdir() do dir
30
30
@test ex. code == LibGit2. Error. EAUTH
31
31
end
32
32
end
33
+
34
+ @testset " with empty credentials" begin
35
+ try
36
+ repo_path = joinpath (dir, " Example3" )
37
+ # credentials are required because github tries to authenticate on unknown repo
38
+ cred = LibGit2. UserPasswordCredentials (" " ," " ) # empty credentials cause authentication error
39
+ LibGit2. clone (repo_url* randstring (10 ), repo_path, payload= Nullable (cred))
40
+ error (" unexpected" )
41
+ catch ex
42
+ @test isa (ex, LibGit2. Error. GitError)
43
+ if is_windows () && LibGit2. version () >= v " 0.26.0"
44
+ # see #22681 and https://github.com/libgit2/libgit2/pull/4055
45
+ @test_broken ex. code == LibGit2. Error. EAUTH
46
+ @test ex. code == LibGit2. Error. ERROR
47
+ else
48
+ @test ex. code == LibGit2. Error. EAUTH
49
+ end
50
+ end
51
+ end
33
52
end
34
53
end
You can’t perform that action at this time.
0 commit comments