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
[SR-4621] [PackageManager] Package fetch with authentication broken. #5034
Comments
This seem to happen when host authenticity is not established i.e. when git shows prompts like this: The authenticity of host 'gitlab.com (52.167.219.168)' can't be established. From what I understand this should have been solved by #1001 but looks like it doesn;t work for host authenticity prompt. Workaround: Make sure it is possible to clone the repository using git. |
Comment by Jeremy Fillingim (JIRA) I'm not experiencing the particular issue that you are pointing out (meaning I don't have the host authenticity issue) when I clone my private repositories with git via both https and ssh. I'm working around it by using Swift 3.0.1 (where the issue does not exist), but it was disappointing to encounter a flaw of this type in an official release. Here is a capture of some (hopefully) illustrative commands: When I clone the following repository via https, it prompts me for username and password, and succeeds.
When the fetch happens through swift, I am prompted for a username, then nothing else happens.
I have a line in my Package.swift file that looks like:
|
That patch probably hasn't made into the 3.1 release then. I suggest using a SSH key and git+ssh instead of https. |
Environment
Swift-3.1 RELEASE
MacOS 10.12.3
Additional Detail from JIRA
md5: 11778934c6398f702d4ea2ffc76bce9f
duplicates:
is duplicated by:
relates to:
Issue Description:
With the Swift 3.1 release, it appears that fetching packages from URLs that require authentication is broken.
Either https or ssh access results in a hang when attempting to fetch via 'swift package fetch' or via 'swift build'.
This was detected during an upgrade from Swift 3.0.1 RELEASE to Swift 3.1 RELEASE. I have only tested this with gitlab, but making a project Public allows it to be fetched.
The text was updated successfully, but these errors were encountered: