-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Redirection of links of VCS repositories does not work #24
Comments
With the Github driver, the redirection does not work, because the driver uses the API v3 of Github.com. An automatic redirection exists for navigation with the browser or using GIT (https://github.com/blog/1508-repository-redirects-are-here), but they does not work with the API. I contacted the support of Github.com, and am awaiting a response. However the issue Github API returns 404, but default http request returns 301 on Stackoverflow, tells me that it's not going to be fixed quickly (+6 months). |
To summarize the response of support: use the solution described in the question Github API returns 404, but default http request returns 301. |
Looks like this is a general problem of composer then too, right? So when renaming repos, the original author has to take care about renaming the repo Urls in the bower repo. I'd suggest to report this problem to the library authors instead of building unreliable workarounds or waiting for github to change it. |
@cebe The subject is very interesting, and I just spent a good part of the afternoon talking to guys of support of Github. The problem with redirects of Github, it's that they are only available for the classic HTTP access and GIT, but that the API does not have this capability. For the support of Github, it is true that this impossibility is problematic, but it's not tomorrow that the APIs will have the automatic redirects, and they advised me to take this analysis directly into my tool. Given that the redirects work for GIT and classic HTTP access, the owner of the repository does not feel compelled to change the URL in the dependency manager, because it is still functional (for example, I created an issue for hammerjs, and my issue went unanswered for several months, and the URL has not changed). I made a prototype for the fallback directly into Composer for Github driver (given that this is an issue of service Github). The prototype is functional for the public repositories, but not for the private repositories (because of the inability to authenticate with the token on github.com, and this is confirmed by the support). The support must yet to get back to me, for to suggest me an alternative way to find the new URL for the private repositories, but at first glance, it's not possible. It is true that it is only the public repositories that pose a problem. However, for them, the principle of my implementation is the more appropriate. |
@cebe I asked to the support if I could get the new URLs using raw.github.com, and the response is simple: it's not possible. But on the other hand, the content is recoverable with the old or the new URL, and this is compatible with private repositories (I have not still tested). In this case, we just have to change the URL api.github.com to raw.github.com. |
@cebe But ultimately, it's not possible to use raw.github.com, because we need get the list of tags and branchs. It remains that the first solution: usable only with public repositories (and it is them that pose problem). |
Fixed by b9fb567. |
The redirection of VCS Repositories does not work correctly.
Example:
The text was updated successfully, but these errors were encountered: