diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd7f09c85..eaa3633edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * ![Enhancement][badge-enhancement] The padding of the various container elements in the HTML style has been reduced, to improve the look of the generated HTML pages. ([#1814][github-1814], [#1818][github-1818]) * ![Bugfix][badge-bugfix] Build failures now only show fatal errors, rather than all errors. ([#1816][github-1816]) +* ![Bugfix][badge-bugfix] Disable git terminal prompt when detecting remote HEAD branch for ssh remotes, and allow ssh-agent authentication (by appending rather than overriding ENV). ([#1821][github-1821]) ## Version `v0.27.17` @@ -1032,6 +1033,7 @@ [github-1814]: https://github.com/JuliaDocs/Documenter.jl/issues/1814 [github-1816]: https://github.com/JuliaDocs/Documenter.jl/pull/1816 [github-1818]: https://github.com/JuliaDocs/Documenter.jl/pull/1818 +[github-1821]: https://github.com/JuliaDocs/Documenter.jl/pull/1821 [julia-38079]: https://github.com/JuliaLang/julia/issues/38079 diff --git a/src/Documenter.jl b/src/Documenter.jl index b4bd6d4d47..4f0302d14a 100644 --- a/src/Documenter.jl +++ b/src/Documenter.jl @@ -532,9 +532,12 @@ function deploydocs(; # Try to figure out default branch (see #1443 and #1727) if devbranch === nothing + env = copy(ENV) + env["GIT_TERMINAL_PROMPT"] = "0" + env["GIT_SSH_COMMAND"] = get(env, "GIT_SSH_COMMAND", "ssh -o \"BatchMode yes\"") str = try read(pipeline(ignorestatus( - setenv(`git remote show origin`, ["GIT_TERMINAL_PROMPT=0"]; dir=root) + setenv(`git remote show origin`, env; dir=root) ); stderr=devnull), String) catch ""