isetbio / RemoteDataToolbox

Matlab utilities for managing reading and writing of data files stored on a remote web server.
6 stars 6 forks source link

Problem publishing a zip file #83

Open JWinawer opened 7 years ago

JWinawer commented 7 years ago

I am trying to publish a zip file and am receiving an error I cannot debug.

The code I used for publishing is this:

% make a temporary directory
folder = fullfile(tempdir, 'myRdtTest');
mkdir(folder);
cd(folder);

% make a dummy variable
someVariable = 'foo';

% save a small file
save('toBeZipped.mat', 'someVariable');

% zip it
zip('deleteme.zip', 'toBeZipped.mat');

% remove the mat file
delete('toBeZipped.mat');

% Create remote data toolbox object
rd = RdtClient('vistasoft');

% To write to the archive, you must have a password
rd.credentialsDialog;

% Change the remote path
rd.crp('/vistadata/functional');
p = rd.listRemotePaths

% Publish it
rd.publishArtifacts(folder,'type','zip');

The error I get is this:

Error using gradlePublishArtifact (line 110)
error status 1 (:generatePomFileForMavenPublication
:publishMavenPublicationToMavenRepository
Upload http://52.32.77.154/repository/vistasoft/vistadata/functional/deleteme/1/deleteme-1.pom
Could not transfer artifact vistadata.functional:deleteme:pom:1 from/to remote
(http://52.32.77.154/repository/vistasoft/): Could not write to resource
'vistadata/functional/deleteme/1/deleteme-1.pom'
Upload http://52.32.77.154/repository/vistasoft/vistadata/functional/deleteme/1/deleteme-1-zip.zip
Could not transfer artifact vistadata.functional:deleteme:zip:zip:1 from/to remote
(http://52.32.77.154/repository/vistasoft/): Could not write to resource
'vistadata/functional/deleteme/1/deleteme-1-zip.zip'
:publishMavenPublicationToMavenRepository FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
   > Failed to deploy artifacts: Could not transfer artifact vistadata.functional:deleteme:pom:1
   from/to remote (http://52.32.77.154/repository/vistasoft/): Could not write to resource
   'vistadata/functional/deleteme/1/deleteme-1.pom'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
output.

BUILD FAILED

Total time: 1.031 secs
)

Error in rdtPublishArtifact (line 67)
[localPath, pomPath, type] = gradlePublishArtifact(configuration.repositoryUrl, ...

Error in rdtPublishArtifacts (line 141)
    artifactCell{ii} = rdtPublishArtifact(configuration, ...

Error in RdtClient/publishArtifacts (line 369)
            artifacts = rdtPublishArtifacts(obj.configuration, ...
render-toolbox commented 7 years ago

I suspect that the problem may be that your password has expired on the server. I was able to reproduce something very much like this problem starting with the example code but connecting to the the isetbio repository, but it turned out my password had expired. When I reset my password, it then worked as expected.

It is annoying that we have to keep resetting our passwords, but we have not been able to defeat this feature of the server.

To reset, you go to the web page, hit login, and then hit the button on the lower right of the dialog that says "Reset Password." You'll get an email with a link that allows you to reset the password.

Let me know if this fixes your version of the problem. If not I will delve deeper.

DB

From: Jonathan Winawer notifications@github.com Reply-To: isetbio/RemoteDataToolbox reply@reply.github.com Date: Thursday, May 4, 2017 at 8:48 AM To: isetbio/RemoteDataToolbox RemoteDataToolbox@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [isetbio/RemoteDataToolbox] Problem publishing a zip file (#83)

I am trying to publish a zip file and am receiving an error I cannot debug.

The code I used for publishing is this:

% make a temporary directory

folder = fullfile(tempdir, 'myRdtTest');

%folder = '/private/tmp/myRdtTest/';

mkdir(folder);

cd(folder);

% make a dummy variable

someVariable = 'foo';

% save a small file

save('toBeZipped.mat', 'someVariable');

% zip it

zip('deleteme.zip', 'toBeZipped.mat');

% remove the mat file

delete('toBeZipped.mat');

% Create remote data toolbox object

rd = RdtClient('vistasoft');

% To write to the archive, you must have a password

rd.credentialsDialog;

% Change the remote path

rd.crp('/vistadata/functional');

p = rd.listRemotePaths

% Publish the ernie freesurfer directory in the anatomy directory.

rd.publishArtifacts(folder,'type','zip');

The error I get is this:

Error using gradlePublishArtifact (line 110)

error status 1 (:generatePomFileForMavenPublication

:publishMavenPublicationToMavenRepository

Upload http://52.32.77.154/repository/vistasoft/vistadata/functional/deleteme/1/deleteme-1.pom

Could not transfer artifact vistadata.functional:deleteme:pom:1 from/to remote

(http://52.32.77.154/repository/vistasoft/): Could not write to resource

'vistadata/functional/deleteme/1/deleteme-1.pom'

Upload http://52.32.77.154/repository/vistasoft/vistadata/functional/deleteme/1/deleteme-1-zip.zip

Could not transfer artifact vistadata.functional:deleteme:zip:zip:1 from/to remote

(http://52.32.77.154/repository/vistasoft/): Could not write to resource

'vistadata/functional/deleteme/1/deleteme-1-zip.zip'

:publishMavenPublicationToMavenRepository FAILED

FAILURE: Build failed with an exception.

Execution failed for task ':publishMavenPublicationToMavenRepository'.

Failed to publish publication 'maven' to repository 'maven'

Failed to deploy artifacts: Could not transfer artifact vistadata.functional:deleteme:pom:1

from/to remote (http://52.32.77.154/repository/vistasoft/): Could not write to resource

'vistadata/functional/deleteme/1/deleteme-1.pom'

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log

output.

BUILD FAILED

Total time: 1.031 secs

)

Error in rdtPublishArtifact (line 67)

[localPath, pomPath, type] = gradlePublishArtifact(configuration.repositoryUrl, ...

Error in rdtPublishArtifacts (line 141)

artifactCell{ii} = rdtPublishArtifact(configuration, ...

Error in RdtClient/publishArtifacts (line 369)

        artifacts = rdtPublishArtifacts(obj.configuration, ...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/isetbio/RemoteDataToolbox/issues/83, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOVplTA8YExWj6RP5qPcr4196pgIzqEpks5r2ckHgaJpZM4NQn2d.

JWinawer commented 7 years ago

Hi David,

Thanks for checking. Unfortunately, even after updating my archiva password, I get the same error from the same script.

Any other thoughts or suggestions for how I can debug?

Thanks, Jon

DavidBrainard commented 7 years ago

I’ll do a little more poking.

DB

From: Jonathan Winawer notifications@github.com Reply-To: isetbio/RemoteDataToolbox reply@reply.github.com Date: Wednesday, June 14, 2017 at 3:52 PM To: isetbio/RemoteDataToolbox RemoteDataToolbox@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [isetbio/RemoteDataToolbox] Problem publishing a zip file (#83)

Hi David,

Thanks for checking. Unfortunately, even after updating my archiva password, I get the same error from the same script.

Any other thoughts or suggestions for how I can debug?

Thanks, Jon

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/isetbio/RemoteDataToolbox/issues/83#issuecomment-308539566, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGuZTklYRablhBE1wqX8KmXXIKtmzCFks5sEDnpgaJpZM4NQn2d.