-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
Labels
featurea feature request or enhancementa feature request or enhancementgitgit, GitHub, and CI in generalgit, GitHub, and CI in general
Description
This was the "edgiest" of cases, but I thought it was interesting.
Someone at the workshop used a proxy but did not have their environment variables set up for the proxy. I think that proxy-setup is clearly beyond the scope of usethis, but it did seem that from the git_sitrep()
perspective, a network failure is indistinguishable from an invalid token.
With my network off:
usethis::git_sitrep()
#> Git user
#> * Name: 'Ian Lyttle'
#> * Email: 'ian.lyttle@schneider-electric.com'
#> * Vaccinated: TRUE
#> usethis + git2r
#> * Default usethis protocol: <unset>
#> * git2r supports SSH: TRUE
#> * Credentials: '<usethis + git2r default behaviour>'
#> GitHub
#> * Personal access token: '<found in env var>'
#> ✖ Token is invalid.
#> Repo
#> ℹ No active usethis project.
Created on 2019-04-20 by the reprex package (v0.2.1)
As a first idea, could git_sitrep()
look for a successful call to something like httr::GET("https://httpbin.org/get")
to determine if it has network access?
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementgitgit, GitHub, and CI in generalgit, GitHub, and CI in general