Skip to content
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

Downloading some open source licenses gives 403 status code in CI jobs #470

Open
danHayworth opened this issue May 8, 2023 · 3 comments

Comments

@danHayworth
Copy link
Contributor

danHayworth commented May 8, 2023

hey guys, I have been trying to use this plugin having the following configuration:

<plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>license-maven-plugin</artifactId>
      <version>2.0.1</version>
      <executions>
      <execution>
	      <id>download-licenses</id>
	      <goals>
	      <goal>download-licenses</goal>
	      </goals>
      </execution>
      </executions>
   </plugin>

In my CI configuration I am using a maven:3.8.3-openjdk-17 image and it seems like just some open source licenses fail to download with a 403 status code
[DEBUG] About to download 'https://opensource.org/licenses/Apache-2.0' [WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden

Are you aware of any issues in this regard ? Thank you

@danHayworth danHayworth changed the title Downloading some open source licenses give 403 status code in a Docker Maven image Downloading some open source licenses gives 403 status code in a Docker Maven image May 8, 2023
@olamy
Copy link
Member

olamy commented May 8, 2023

not sure. It looks those urls have some relocation.
Maybe you are behind a proxy which doesn't support those new Location?

@danHayworth
Copy link
Contributor Author

I have checked and we are not behind any proxies. What happens in the CI is that whenever the plugin is trying to access any of these links:
WARNING] 'https://opensource.org/licenses/BSD-3-Clause' returned 403 Forbidden
1752[WARNING] 'https://opensource.org/licenses/BSD-3-Clause' returned 403 Forbidden
1753[WARNING] 'https://opensource.org/licenses/eclipse-1.0.php' returned 403 Forbidden
1754[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1755[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1756[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1757[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1758[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1759[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1760[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1761[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1762[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1763[WARNING] 'https://opensource.org/licenses/Apache-2.0' returned 403 Forbidden
1764[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1765[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1766[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1767[WARNING] 'http://opensource.org/licenses/MIT' returned 403 Forbidden
1768[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1769[WARNING] 'http://opensource.org/licenses/BSD-3-Clause' returned 403 Forbidden
1770[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1771[WARNING] 'http://www.opensource.org/licenses/mit-license.php' returned 403 Forbidden
1772[WARNING] There were 21 download errors - check the warnings above

the server responds with a bot challenge, which obviously gonna return 403. I have tried with a docker image instead of maven and it's the same. I used curl to hit one of the above links

Screenshot 2023-05-10 at 4 37 18 PM

@danHayworth danHayworth changed the title Downloading some open source licenses gives 403 status code in a Docker Maven image Downloading some open source licenses gives 403 status code in CI jobs May 10, 2023
@bhamail
Copy link

bhamail commented Feb 22, 2024

Looks like these licenses have moved, and are not being redirected. The new location appears to be below a blog folder:

Old:
https://opensource.org/licenses/Apache-2.0

should be:
https://opensource.org/blog/license/apache-2-0

bhamail added a commit to bhamail/picapsule that referenced this issue Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants