Devtools: hanging on release()

Created on 15 Dec 2016  路  14Comments  路  Source: r-lib/devtools

release() seems to be hanging indefinitely on checking if synched with remote branch. running v1.12.0.9000

release(check = FALSE)
#> Running Git checks for natserv
#> Checking uncommitted files... OK
#> Checking if synched with remote branch
bug release

Most helpful comment

Changing the git location from ssh ([email protected]:USER/REPO.git) to https (https://github.com/USER/REPO.git) worked for me.

All 14 comments

Just experienced same.

Edit: Still not sure the cause, but think it's on my end. Switching to CRAN version avoided the indefinite hanging though.

Last update: A rather large data file got mistakenly added to a subfolder. Once I removed that it ran fine.

I just ran into this issue. In my case it was due to the repo using a SSH key and it asking for a passphrase. This is bit me a few times since MacOS Sierra since it not longer automatically loads SSH keys into the keychain. See this thread.

Changing the git location from ssh ([email protected]:USER/REPO.git) to https (https://github.com/USER/REPO.git) worked for me.

I tried re-cloning the package I was testing as https://github.com/bomeara/yearn.git (github clone with https option) rather than [email protected]:bomeara/yearn.git (github clone with ssh option) and it seemed to eliminate this problem.

I bet it's requesting the passphrase to unlock your ssh keys.

@krlmlr any ideas how we can fix this?

I'm using git2r to check sync status.

@stewid: git2r operations seem to hang indefinitely when using the SSH protocol for some users. Does this ring a bell? Relevant code: https://github.com/hadley/devtools/blob/b05bd25c63690e1b61d978888c298c7b19aacbe4/R/git.R#L25-L59

Maybe it calls the C function callback git2r_cred_acquire_cb over and over again? @krlmlr if you can reproduce the issue, could you please add a break point or a print statement to explore what happens in
https://github.com/ropensci/git2r/blob/master/src/git2r_cred.c#L217

@stewid what happens if you have a SSH key passphrase? Does it try and prompt you to enter the passphrase, but it's failing because it's running inside RStudio, not a regular console?

I'm able to reproduce the issue and I will try to fix it the tomorrow.

Ok, I was able to reproduce the hang, both inside RStudio and on a regular console, with a call to fetch over ssh ([email protected]:ropensci/git2r.git) on a ubuntu 17.04 machine with git2r v0.19. The hang occurred after I turned off the SSH key agent and used a SSH key with a passphrase. The git2r
internal callback to create credentials for the remote host authentication was then called over and over again. I have changed the callback in https://github.com/ropensci/git2r/commit/e289c233968d130098ca0bb68925f30244d297d3 to signal an error instead of trying again if the authentication failed the first time.

@hadley the SSH key passphrase is an argument to the cred_ssh_key function (https://github.com/ropensci/git2r/blob/master/R/credential.r#L139). If the passphrase is required but missing, it prompts the user with the getPass package (if it's installed).

@krlmlr I noticed that git2r::fetch(r, git2r::branch_remote_name(upstream)) in https://github.com/hadley/devtools/blob/b05bd25c63690e1b61d978888c298c7b19aacbe4/R/git.R#L25-L59 does not pass credentials to git2r.

Thanks @stewid !

@stewid Thanks! The release() function doesn't currently have a notion of Git credentials. Do we need to change anything?

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

Was this page helpful?
0 / 5 - 0 ratings