r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
146 stars 31 forks source link

clone sometimes randomly hangs on macos #190

Open jeroen opened 1 year ago

jeroen commented 1 year ago

On MacOS, running this a few times will eventually randomly hang at the last "object":

> gert::git_clone("https://github.com/hadley/tidytext.git", tempfile())
Transferred 9311 of 9312 objects...

Sometimes we see: Error in libgit2::git_clone : SecureTransport error: (null) which suggests a problem in the MacOS TLS.

Doesn't happen on Linux afaict.

cc @hadley

hadley commented 1 year ago

But gert::git_clone("git@github.com:hadley/tidytext.git", tempfile()) seems to work (at least I tried it five times and they all succeeded)

jennybc commented 1 year ago

I tried this at @hadley's request. The first attempt just works and the second remains hung as I type this.

> gert::git_clone("https://github.com/hadley/tidytext.git", tempfile())
Transferred 9312 of 9312 objects...done!
Checked out 143 of 143 commits... done!
> gert::git_clone("https://github.com/hadley/tidytext.git", tempfile())
Transferred 9311 of 9312 objects...

Update! It failed.

Transferred 9311 of 9312 objects...Error in libgit2::git_clone : 
  SecureTransport error: connection closed via error
jeroen commented 1 year ago

@jennybc thanks, which version and architecture of macos do you run?

jennybc commented 1 year ago

I swear I'm going to update my OS soon :see_no_evil:

System Version: macOS 11.7 (20G817)
Kernel Version: Darwin 20.6.0
~/rrr/httr2 % uname -m                                                            
x86_64
jeroen commented 1 year ago

I have created a reproducible example in C (without R) and reported it upstream ☝️

hadley commented 1 year ago

Thanks!!