pkgctl repo clone: give a sensible error when a package cannot be resolved
Currently when trying to clone a project that does not exists GitLab prompts you to sign in:
$ pkgctl repo clone --protocol https apache2
==> Cloning apache2 ...
Cloning into 'apache2'...
Username for 'https://gitlab.archlinux.org': ^C
It would be better if pkgctl
checks if there is a public repo for that name and if not there is a clear error.
With SSH the error is much more clear:
$ pkgctl repo clone apache2 130 ↵
==> Cloning apache2 ...
Cloning into 'apache2'...
Enter passphrase for key '/home/chris/.ssh/christian@heusel.eu':
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found or you don't have permission to view it.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
==> ERROR: failed to clone apache2