bashbrew icon indicating copy to clipboard operation
bashbrew copied to clipboard

Add git authentication to support the private repo case

Open Mazgis47 opened this issue 2 years ago • 3 comments

Example usage: bashbrew --library mylibrary --git-username MyGithubUser --git-password ghp_123456789 --debug --cache /tmp/bashbrew_cache --namespace docker-images.mycompany.com/myalpine build --all --pull always

Mazgis47 avatar Mar 18 '22 09:03 Mazgis47

Thanks for the contribution!

I think rather than adding explicit (manual) support for HTTP authentication to all our Git calls, I'd rather find out / figure out whether go-git supports https://git-scm.com/docs/gitcredentials properly so we can avoid having to specify this everywhere (especially since it's a feature we won't be using, so it won't be getting very much testing and we'll be likely to remove it if it ever has issues or requires changes).

tianon avatar Mar 23 '22 15:03 tianon

Thanks for the contribution!

I think rather than adding explicit (manual) support for HTTP authentication to all our Git calls, I'd rather find out / figure out whether go-git supports https://git-scm.com/docs/gitcredentials properly so we can avoid having to specify this everywhere (especially since it's a feature we won't be using, so it won't be getting very much testing and we'll be likely to remove it if it ever has issues or requires changes).

If I correctly understand they have an open issue on that https://github.com/src-d/go-git/issues/1101 so it is a blocker/dependency to use go-git. There is an example provided but that is not a part of the go-git.

Mazgis47 avatar Mar 24 '22 08:03 Mazgis47

It looks like someone is currently working on adding git credentials support: https://github.com/go-git/go-git/issues/490. So, we should wait until that is available.

(also, we shouldn't be pulling in any dependencies from src-d/go-git since it is an abandoned and archived repo and development has moved to go-git/go-git)

yosifkit avatar Mar 24 '22 16:03 yosifkit