Skip to content
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

git_doctor/github_dr #643

Closed
hadley opened this issue Nov 10, 2014 · 5 comments
Closed

git_doctor/github_dr #643

hadley opened this issue Nov 10, 2014 · 5 comments

Comments

@hadley
Copy link
Member

hadley commented Nov 10, 2014

Check that you're set up to use git/github:

  • Git is installed
  • Have ssh key
  • Have set username and email globally
  • Have github pat token available
@hadley
Copy link
Member Author

hadley commented Apr 28, 2015

@jennybc do you have any code that helps check students are set up correctly to use github? Can you suggest any thing else I should be checking in this function?

@jennybc
Copy link
Member

jennybc commented Apr 28, 2015

All the checks I've ever done have been interactive. FWIW here they are anyway:

We run git config --global --list, which allows sanity check of user.name, user.email, and credential.helper. Note that I usually have students work with GitHub via https, at least at first, rather than fussing with the ssh keys. This requires a credential helper, so we use git --version to make sure it's 1.7.10 or newer. The advice on activating and initializing the credential helper varies by OS and I'm not sure if you even want to get into that.

I think it's great for devtools to do a Git check-up! Other thoughts:

  • I've never used git2r but the cred_*() functions might be relevant to your support of ssh.
  • Telling user where Git lives is a useful thing, because sometimes they need to tell RStudio this explicitly: which git (*nix), where git (some Windows), whereis git.exe (some other Windows).
  • Checking that the Git executable is in PATH would also be a huge favour for novices.

@hadley
Copy link
Member Author

hadley commented Apr 28, 2015

git2r has come a long way since I last looked at it - I think I might be able to replace a lot of code.

@hadley hadley closed this as completed in 4ef0474 Apr 29, 2015
@hadley
Copy link
Member Author

hadley commented Apr 29, 2015

@jennybc I decided not to implement the path checking - RStudio also makes some efforts to determine the correct git path, and I don't want to have to replicate exactly what it does. I think in the long run, it might be possible for RStudio to also switch to using git2r, thus avoiding the path problem altogether.

@lock
Copy link

lock bot commented Sep 18, 2018

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/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants