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

Access token as string not working for enterprise Github and Gitlab #145

Open
maximilianmordig opened this issue Jun 24, 2021 · 0 comments

Comments

@maximilianmordig
Copy link

gert/R/fetch.R

Line 48 in 3d5e13b

cred_cb <- make_cred_cb(password = password, verbose = verbose)

Calling

gert::git_clone(
      url = "https://github.company.com/repo1", path = ".", password = "accessToken"
    )

does not work because the username is not provided to make_cred_cb (NA).
By changing

stop("To use a hardcoded password, include your username in the URL like 'https://jerry@github.com")
to username <- "git", this works with on-premise GitHub.
However, it does not work with on-premise Gitlab, where it fails with:

Error in libgit2::git_clone : 
  server requires authentication that we do not support

git2r::clone supports both via git2r::cred_token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant