github / maven-plugins

Official GitHub Maven Plugins
MIT License
587 stars 197 forks source link

java.io.IOException: Not Allowed (405) for medium sized file #65

Open dwissk opened 10 years ago

dwissk commented 10 years ago

When trying to push a 23MB .war file with the site-maven-plugin to a private github repository I get the following stacktrace:

[DEBUG] Creating blob from webapp.base-0.1.war
[...]
[ERROR] Failed to execute goal com.github.github:site-maven-plugin:0.8:site (merge updated repository back to github) on project webapp.base: Error creating blob: Not Allowed (405) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:site-maven-plugin:0.8:site (merge updated repository back to github) on project webapp.base: Error creating blob: Not Allowed (405)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating blob: Not Allowed (405)
    at com.github.maven.plugins.site.SiteMojo.createBlob(SiteMojo.java:279)
    at com.github.maven.plugins.site.SiteMojo.execute(SiteMojo.java:337)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: java.io.IOException: Not Allowed (405)
    at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:526)
    at org.eclipse.egit.github.core.client.GitHubClient.sendJson(GitHubClient.java:605)
    at org.eclipse.egit.github.core.client.GitHubClient.post(GitHubClient.java:719)
    at org.eclipse.egit.github.core.service.DataService.createBlob(DataService.java:115)
    at com.github.maven.plugins.site.SiteMojo.createBlob(SiteMojo.java:275)
    ... 22 more

My settings.xml looks as follows:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
    <server>
      <id>github</id>
      <password>[oauth token from my profile configured with private 'repo' access]</password>
    </server>
  </servers>
</settings>

Since I can upload small .jar and .pom files using with the same settings.xml I assume the issue is caused by file size (given that the "creating blob from file" step seems to take a while). I am aware that there is a 1GB repository and 100MB file size limit on all github repositories.

Any help would be appreciated.

poblish commented 10 years ago

I noticed this yesterday while trying to upload a 27 MB .jar to a public repo, using a configuration that's worked perfectly on other projects.

I'm using version 0.9 but other than that the exception is the same. I've regenerated the OAuth token but I'm sure it's not really an auth/permissions thing.

dwissk commented 10 years ago

I've moved on to Nexus... Pity, I liked the poor man's repo solution...

poblish commented 10 years ago

I'm still using Github as the repo, but I'm having to manually upload the artifacts - annoying, but it works.