require_url_format() fails to take into account valid SSH paths
require_url_format() in lib/spack/util/url.py fails to take into account valid SSH path values such as "[email protected]:spack/spack.git". Up until this function was added, I've been successfully using values like this in the git= property of my packages.
Commit that added this function: 4aee27816e7101753aeb392e868096236a26d84d. I've confirmed my package does indeed build and install correctly before this commit.
Error I get when trying to install my package: ==> Error: Invalid url format from url: (tested on a4f32dbf8d3ed3a28692caa09a00560096452168)
I'd like to propose that since the git= property is not actually always a URL, that URL validation should not be run for it.
Pinging @scheibelp and @johnwparent since, if I recall correctly, this was added as part of the Windows support.
I'm running into this too and am not sure of a workaround. git clone [email protected]:HPC/mini-HACC.git works,
SPACK returns ==> Error: Invalid url format from URL
I haven't been able pull the bits out of github with any other syntax.
I am able to reproduce the problem in an existing package that I tweaked (i.e., changed the url property to use that form).
A quick fix allows me to get past the error; however, I am prompted for my SSH passphrase, which could be problematic for packages contributed back to Spack.
@scheibelp What do you think?
Using git = "ssh://[email protected]:spack/spack.git" should work (i.e. prepending ssh://). I assume @tldahlgren that's what you mean by a quick fix; the password prompt AFAIK is expected - @benpm I assume you have ssh keys configured for git interaction, but let me know if prepending ssh:// does not produce a satisfactory result.
Using
git = "ssh://[email protected]:spack/spack.git"should work (i.e. prependingssh://). I assume @tldahlgren that's what you mean by a quick fix; the password prompt AFAIK is expected - @benpm I assume you have ssh keys configured for git interaction, but let me know if prependingssh://does not produce a satisfactory result.
using ssh:// does indeed work
I have the same problem, namely Error: Invalid url format from url: [email protected]:C2SM/icon-exclaim.git. It can be cloned by hand fine. But the prefix "ssh://" does not work for me: git = "ssh://[email protected]:C2SM/icon-exclaim.git" give the error: "ssh: Could not resolve hostname github.com:C2SM" (and it cannot be cloned by hand with the prefix). Am I missing something obvious?
Closing this as require_url_format is no longer in the codebase as of #34452