[build2] Using ssh-git
Bo Lorentsen
bl at lue.dk
Wed Oct 31 15:28:07 UTC 2018
On 10/31/2018 03:10 PM, Karen Arutyunov wrote:
> Currently supported git protocols are git://, http://, and https://
> for remote repositories and file:// for local repositories. Thus bpkg
> has interpreted
> ssh:/git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix as a
> relative path completing it to
> file:///home/bl/ssh:/git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix.
>
> For details on repository types and protocols run:
>
> $ bpkg help repository-types
Thanks for the pointer, this explains what I need.
My focus will have to be using https as git schema and then find a way
to handle credentials in a sane way.
I normally use git credential store, and this needs to be set for each
new cloning, in the local repo. And as I understand it, bpkg will make a
clone (smart if possible), but by doing that it (git) also will prompt
for credentials, on every clone attempt (for aws https at least).
This will not be a problem on github and other open source platforms, of
cause :-)
>
> When you didn't specify the '--type git' bpkg treated the URL as an
> archive-based repository location (like
> https://pkg.cppget.org/1/alpha) as it doesn't contain any indication
> that it refers git repository (like 'git:' scheme or '.git' directory
> extension).
That makes sense.
>
> When you specified the '--type git' option then everything worked as
> expected. Note that bpkg runs git commands underneath (you can see
> them when specify -v option). The repository server for
> https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix
> requires authentication. Just try:
>
> $ git clone
> https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix
>
> To avoid the prompt you can probably incorporate username/password
> into the URL, like
> https://<username>:<password>@git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix
Ahh, yes this would work, I totally forgot about credentials in the URL.
Thanks, I am really looking forward to using b2 packages and build, I
like the flexibility there is in the design, but unfortunately I also
gets confused by the level of complexity :-)
/BL
More information about the users
mailing list