You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/04/02 07:00:25 UTC
[I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
jira-importer opened a new issue, #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223
**[Morten Kristiansen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mortenkr)** opened **[MDEPLOY-18](https://issues.apache.org/jira/browse/MDEPLOY-18?redirect=false)** and commented
I'm currently using scp to deploy a artifact to a remote repository:
morten@damien:~/workspace/HEAD/tt-main$ mvn deploy
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building tt-main
[INFO] task-segment: [deploy]
[INFO] ----------------------------------------------------------------------------
[INFO] [install:install]
[INFO] Installing /home/morten/workspace/HEAD/tt-main/pom.xml to /home/morten/.m2/repository/tracetracker/tt-main/1.0.0/tt-main-1.0.0.pom
[INFO] [deploy:deploy]
Uploading: scp://marple.pd.tracetracker.com/tracetracker/tt-main/1.0.0/tt-main-1.0.0.pom
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error deploying artifact: Error performing commands for file transfer
mkdir: cannot create directory `/tracetracker': Permission denied
[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Jan 03 19:56:27 CET 2006
[INFO] Final Memory: 2M/5M
[INFO] ----------------------------------------------------------------------------
morten@damien:~/workspace/HEAD/tt-main$
I have no problems executing a scp from a shell. No problems creating folders on the server.
---
**Attachments:**
- [pom.xml](https://issues.apache.org/jira/secure/attachment/12715214/pom.xml) (_6.07 kB_)
- [settings.xml](https://issues.apache.org/jira/secure/attachment/12715256/settings.xml) (_261 bytes_)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516565
**[Brett Porter](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=brettporter)** commented
that error comes straight from the remote shell. It is trying to create /tracetracker (that's at the root of the drive), which is rarely possible with normal permissions. This would be done with user morten.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516595
**[Morten Kristiansen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mortenkr)** commented
Yes. Giving the full path worked. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516586
**[Morten Kristiansen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mortenkr)** commented
Again I refer to the question, WHY is it trying to create a folder at /...?? I havn't told Maven anywhere that I want something created there. I have added "scp://marple.pd.tracetracker.com/repository/maven2" as repo info. If I perform an ssh to scp://marple.pd.tracetracker.com/ the folder "repository/maven2" exists, and I would expect Maven to start creating project folders below that path. It's Maven that builds up and executes the command "mkdir" somewhere and for some strange reason tries to create it in root of server.
I perform this with a user called "maven". My repository on the remote server is "/home/maven/repository/maven2". And that's where I want to deploy the files. Is the scp URL incorrect?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516580
**[Brett Porter](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=brettporter)** commented
ok, that's more like it.
The failure with those settings is actually a failure to create /repository. That's to be expected - you don't have write permissions to /.
Create /repository/m2 on the remote host, and set its permissions to the user/group you are using to deploy with.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516569
**[Morten Kristiansen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mortenkr)** commented
But why is it trying to create tracetracker at /? And it's not using morten as user, but maven:
From pom.xml:
\<distributionManagement>
\<repository>
\<id>marplerepo\</id>
\<url>scp://marple.pd.tracetracker.com/repository/maven2\</url>
\</repository>
\</distributionManagement>
From ~/.m2/settings.xml
\<servers>
\<server>
\<id>marplerepo\</id>
\<username>maven\</username>
\<privateKey>/home/morten/.ssh/id_rsa\</privateKey>
\</server>
\</servers>
I have also tried setting:
\<filePermissions>664\</filePermissions>
\<directoryPermissions>777\</directoryPermissions>
but that doesn't work etiher.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516589
**[Brett Porter](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=brettporter)** commented
the path after the host is absolute. Set it to scp://marple.pd.tracetracker.com/home/maven/repository/maven2 instead of scp://marple.pd.tracetracker.com/repository/maven2 and you should get what you expect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516574
**[Brett Porter](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=brettporter)** commented
I've never seen anything like that.
Do you have a second distributionManagement section by accident?
Is it possible to attach your full POM?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-18] Problem with SCP deploy [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #223:
URL: https://github.com/apache/maven-deploy-plugin/issues/223#issuecomment-2771516577
**[Morten Kristiansen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mortenkr)** commented
Attached both POM and settings.xml. The output I pasted above isn't correct, because I tried several scp paths. This is the output using the attached pom.xml and settings.xml:
morten@damien:~/workspace/HEAD/arch-common-security-java$ mvn deploy
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building arch-common-security-java
[INFO] task-segment: [deploy]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Setting reports dir: /home/morten/workspace/HEAD/arch-common-security-java/target/surefire-reports
---
T E S T S
---
Morten: Removed output
[INFO] [jar:jar]
[INFO] Building jar: /home/morten/workspace/HEAD/arch-common-security-java/target/arch-common-security-java-1.2.0.jar
[INFO] [install:install]
[INFO] Installing /home/morten/workspace/HEAD/arch-common-security-java/target/arch-common-security-java-1.2.0.jar to /home/morten/.m2/repository/tracetracker/arch-common-security-java/1.2.0/arch-common-security-java-1.2.0.jar
[INFO] [deploy:deploy]
Uploading: scp://marple.pd.tracetracker.com/repository/maven2/tracetracker/arch-common-security-java/1.2.0/arch-common-security-java-1.2.0.jar
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error deploying artifact: Error performing commands for file transfer
mkdir: cannot create directory `/repository': Permission denied
[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Thu Jan 05 10:10:24 CET 2006
[INFO] Final Memory: 5M/10M
[INFO] ----------------------------------------------------------------------------
morten@damien:~/workspace/HEAD/arch-common-security-java$
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org