-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloning from GitHub over ssh in 0.6-dev #20695
Comments
Here's a potential fix: diff --git a/base/pkg/entry.jl b/base/pkg/entry.jl
index 0d53268f96..84f128d268 100644
--- a/base/pkg/entry.jl
+++ b/base/pkg/entry.jl
@@ -207,16 +207,18 @@ function clone(url::AbstractString, pkg::AbstractString)
end
function clone(url_or_pkg::AbstractString)
+ if !(':' in url_or_pkg)
urlpath = joinpath("METADATA",url_or_pkg,"url")
- if !(':' in url_or_pkg) && isfile(urlpath)
+ if isfile(urlpath)
pkg = url_or_pkg
url = readchomp(urlpath)
# TODO: Cache.prefetch(pkg,url)
- else
+ return clone(url,pkg)
+ end
+ end
url = url_or_pkg
m = match(r"(?:^|[/\\])(\w+?)(?:\.jl)?(?:\.git)?$", url)
m !== nothing || throw(PkgError("can't determine package name from URL: $url"))
pkg = m.captures[1]
- end
- clone(url,pkg)
+ return clone(url,pkg)
end However, the root cause here is that |
did #20735 change this at all? |
I got exactly the same problem with julia v0.5.1 on Windows machines (Windows 10). Interestingly, on Mac OS X and Linux machines, I don't have this issue. Also, on Windows, using |
See my PR which fixes it. Needs a test, which is a pain since it's a package operation. |
@StefanKarpinski, thanks for your PR fix: 8fb132f . I think I modified base/pkg/entry.jl correctly. Yet, I still got the following error:
|
Did you also recompile Julia after patching the file? That appears to be the same issue. |
@StefanKarpinski, thanks. But could you tell me how to recompile julia after this patch? I know how to do precompile individual files of mine via |
Don't worry about it, I'm working on adding tests to that PR at which point we can merge it and backport it. |
work-around joinpath error when cloning git ssh urls (fix #20695)
I get the following error when trying to clone an unregistered package:
As you can see, cloning works over https but not over ssh. Somehow the ssh url (which contains a colon and thus can be mistaken for a drive/path pair) ends up in
joinpath
, with anArgumentError
thrown as result.The text was updated successfully, but these errors were encountered: