[build2] Using ssh-git
Karen Arutyunov
karen at codesynthesis.com
Wed Oct 31 14:10:02 UTC 2018
On 10/31/18 4:17 PM, Bo Lorentsen wrote:
> I tried to use the ssh access first, as this is more easy for to manage,
> when all keys has been setup. It did not recognize the ssh schema, so I
> added the '--type git' option, but the result was :
>
> $ bpkg -v rep-info
> ssh://git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix
> --type git
> git --version
> ...
> git ls-remote
> file:///home/bl/ssh:/git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix
> fatal:
> '/home/bl/ssh:/git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix'
> does not appear to be a git repository
> fatal: Could not read from remote repository.
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
> I tried the https version instead :
>
> $ bpkg -v rep-info
> https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/phoenix
>
> It now ask for username and password, after I also here applied '--type
> git'.
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).
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
More information about the users
mailing list