-
Notifications
You must be signed in to change notification settings - Fork 10
Add OpenSSH_jll as a direct dependency, and force our Git to use OpenSSH_jll (instead of the system ssh)
#55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9c08053
Use `ssh` from `OpenSSH_jll` instead of relying on system one
giordano 5735b29
Add tests
DilumAluthge f83d774
Merge branch 'master' into dpa/openssh_jll
DilumAluthge 7c53abc
Remove unnecessary `cd()` in tests
DilumAluthge 482f020
Mark a test as skipped if not CI
DilumAluthge 15615fd
Apply suggestions from code review
DilumAluthge d953d16
Make sure secret is available
DilumAluthge cf18a74
Use `run()` so we can see stdout and stder
DilumAluthge a9b022b
Add back also `Git_jll` paths
giordano 00fcb7d
Merge branch 'master' into dpa/openssh_jll
DilumAluthge b2511ad
ssh -vvv
DilumAluthge 68704b6
chmod 600 our private key
DilumAluthge 0851b20
Linux github.com known hosts
DilumAluthge efde349
mkdir -p ~/.ssh (linux)
DilumAluthge 0b55524
Windows known hosts
DilumAluthge 97523c1
Whitespace
DilumAluthge 59f8597
Update runtests.jl
DilumAluthge df8111d
Merge branch 'master' into dpa/openssh_jll
DilumAluthge 06429a0
Don't do the `OpenSSH_jll` stuff on Windows (#62)
DilumAluthge 2c9bf50
Test suite: turn off SSH verbosity
DilumAluthge 472fdff
Apply suggestions from code review
DilumAluthge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,21 @@ | ||
| name = "Git" | ||
| uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" | ||
| version = "1.4.0" | ||
| authors = ["Dilum Aluthge", "contributors"] | ||
| version = "1.3.1" | ||
|
|
||
| [deps] | ||
| Git_jll = "f8c6e375-362e-5223-8a59-34ff63f689eb" | ||
| JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" | ||
| OpenSSH_jll = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" | ||
|
|
||
| [compat] | ||
| Git_jll = "2.44" | ||
| JLLWrappers = "1.1" | ||
| OpenSSH_jll = "9, 10" | ||
| julia = "1.6" | ||
|
|
||
| [extras] | ||
| JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" | ||
| Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
|
||
| [targets] | ||
| test = ["JLLWrappers", "Test"] | ||
| test = ["Test"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,3 +71,39 @@ end | |
| @test dir1_log == dir2_log | ||
| end; end | ||
| end | ||
|
|
||
| # https://github.com/JuliaVersionControl/Git.jl/issues/51 | ||
| @testset "OpenSSH integration" begin | ||
| is_ci = parse(Bool, strip(get(ENV, "CI", "false"))) | ||
| is_gha = parse(Bool, strip(get(ENV, "GITHUB_ACTIONS", "false"))) | ||
| if is_ci && is_gha | ||
| @info "This is GitHub Actions CI, so running the OpenSSH test..." | ||
| mktempdir() do sshprivkeydir | ||
| privkey_filepath = joinpath(sshprivkeydir, "my_private_key") | ||
| open(privkey_filepath, "w") do io | ||
| ssh_privkey = ENV["CI_READONLY_DEPLOYKEY_FOR_CI_TESTSUITE_PRIVATEKEY"] | ||
| println(io, ssh_privkey) | ||
| end # open | ||
| # We need to chmod our private key to 600, or SSH will ignore it. | ||
| chmod(privkey_filepath, 0o600) | ||
|
|
||
| # ssh_verbose = "-vvv" # comment this line back out when you are finished debugging | ||
| ssh_verbose = "" # uncomment this line when you are finished debugging | ||
|
|
||
| withenv("GIT_SSH_COMMAND" => "ssh $(ssh_verbose) -i \"$(privkey_filepath)\"") do | ||
| withtempdir() do workdir | ||
| @test !isdir("Git.jl") | ||
| @test !isfile(joinpath("Git.jl", "Project.toml")) | ||
| # We use `run()` so that we can see the stdout and stderr in the CI logs: | ||
| proc = run(`$(git()) clone --depth=1 [email protected]:JuliaVersionControl/Git.jl.git`) | ||
| @test success(proc) | ||
| @test isdir("Git.jl") | ||
| @test isfile(joinpath("Git.jl", "Project.toml")) | ||
| end # withtempdir/workdir | ||
| end # withenv | ||
| end # withtempdir/sshprivkeydir | ||
| else | ||
| # Mark this test as skipped if we are not running in CI | ||
| @test_skip false | ||
| end # if | ||
| end # testset | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.