sapling icon indicating copy to clipboard operation
sapling copied to clipboard

Cannot use GitHub's https authentication with shared private repository

Open ojciec-dev opened this issue 2 years ago • 0 comments

I'm a contributor in a private GitHub repository. I'm following https://sapling-scm.com/docs/introduction/getting-started to set up Sapling and I cannot figure out how to get https GitHub's authentication to work.

I'm getting this error when trying to clone the private repo that does not belong to me:

> sl clone https://github.com/$user/$private_repo.git
abort: git command failed with exit code 128
  git '--git-dir=/Users/ojciec/dev/sharedproject/.sl/store/git' ls-remote --symref 'https://github.com/$user/$private_repo.git' HEAD
    fatal: could not read Username for 'https://github.com/$user/$private_repo.git': Device not configured

And I cannot specify my username in the https command anymore

sl clone https://ojciec-dev:<pwd>@github.com/$user/$private_repo.git
> remote: Support for password authentication was removed on August 13, 2021.

The only way I can clone this repo is using ssh where I can specify what user is cloning that repo.

So is there a way to use https in this case, or ssh is my only option?

ojciec-dev avatar Nov 03 '23 14:11 ojciec-dev