Bamboo scp task not working
Asked by Aakash Basnet:

I am trying to copy the artifact (i.e gchEar.ear shown in log file below)to remote server but getting the error like there is no file to upload

The log file of build containing the artifact, deployment log and configuration the scp task is as follow for your reference. Can any one help me to resolve this issue.

image2015-6-10 14:36:13.png

image2015-6-10 14:17:50.png

image2015-6-10 14:12:23.png  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=1815){#link_1168920c7a7881}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8327/1/image2015-6-10%2014%3A17%3A50.png){#display_1168920c7a7881_0}  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=1816){#link_1168920c7a7881_0}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8327/2/image2015-6-10%2014%3A12%3A23.png){#display_1168920c7a7881_2}  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=1817){#link_1168920c7a7881_1}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8327/3/image2015-6-10%2014%3A20%3A35.png){#display_1168920c7a7881_4}  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=1818){#link_1168920c7a7881_2}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8327/4/image2015-6-10%2014%3A33%3A4.png){#display_1168920c7a7881_6}  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=1819){#link_1168920c7a7881_3}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8327/5/image2015-6-10%2014%3A36%3A13.png){#display_1168920c7a7881_8}


Answers:
author: rsperafico
body: Hello Aakash,

Thank you for your reply.

If you EAR file can be located in the Build Working Directory for your deployment (*/usr/appl/cie/home/uatcie/bamboo-home/xml-data/build-dir/6651906/13500417-14548993* ) and its full path is (*/usr/appl/cie/home/uatcie/bamboo-home/xml-data/build-dir/6651906/13500417-14548993/gchEar.ear*).

As our documentation [Using the SCP task in Bamboo](https://confluence.atlassian.com/display/BAMBOO/Using+the+SCP+task+in+Bamboo) suggests:
> The local path (**relative to the Bamboo working directory**) to the files you want to copy. Use commas to separate files and directories. You can also use Ant-style [pattern matching](https://confluence.atlassian.com/display/BAMBOO/Pattern+matching+reference) to include multiple files, such as `**/target/*.jar`.

You could place ***\*.ear*** or ***gchEar.ear*** in Local Path input field.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support


author: Aakash Basnet
body: @ Rafael Aperafico :thankyou very much for your input:

Actually,above I provided you the path of Build working directory of Build plan not the deployment plan.

I tried with your suggestion, but again got the same error.

In "local path" I had given the path same (/usr/appl/cie/home/uatcie/bamboo-home/xml-data/build-dir/6651906/13500417-14548993/gchEar.ear) as shown in deployment log which has artifact also which I confirmed with ls -l command script task.

but still I am getting the error of **there were no files to upload.**am I missing something in Scp task configuration, Isn't the location of artifact?

Below is **scp task configuration screensho** t and**deployment log screenshot** for your reference:

Also the artifact named gchEar.ear and gchWeb.war can be seen clearly here belo:

image2015-6-12 16:34:27.png

image2015-6-12 16:2:33.png

image2015-6-12 16:0:10.png  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=11421){#link_1168921c18fad9}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8331/1/image2015-6-12%2016%3A0%3A10.png){#display_1168921c18fad9_0}  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=11422){#link_1168921c18fad9_0}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8331/2/image2015-6-12%2016%3A2%3A33.png){#display_1168921c18fad9_2}  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=11423){#link_1168921c18fad9_1}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8331/3/image2015-6-12%2016%3A34%3A27.png){#display_1168921c18fad9_4}


author: rsperafico
body: Hello Aakash,

Thank you for your question.

Please, visit the Build Working Directory, 2nd line in the build log below and review where the artifacts are being downloaded to:

image2015-6-11 11:11:2.png

Please, make sure the "*Local Path*" given can be resolved based on the Build Working Directory above and its artifacts location.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support  
[](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-scp-task-not-working/qaq-p/262333?attachment-id=12878){#link_11689222d73a6e}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8328/1/image2015-6-11%2011%3A11%3A2.png){#display_11689222d73a6e_0}

comments: author: Aakash Basnet
body: the artifact is found here: i.e gchEar.ear /usr/appl/cie/home/uatcie/bamboo-home/xml-data/build-dir/6651906/JA1-GCHJAV-JOB1/gchEar/target/gchEar.earand I provide the "local path" the same path. The is a artifact but the log gives an error saying there is no files to upload, what is the problem I am having just to copy this artifact to remote server?


author: rsperafico
body: Hello Aakash,Based on the screenshot you have provided for the "Deployment: release 28 on Staging", as mentioned in this thread, please look at the 2nd line in the screenshot which states:10-Jun-2015 14:16:49 Build Working directory is /usr/appl/cie/home/uatcie/bamboo-home/xml-data/build-dir/6651905/13500417-14548993/Please, notice the Build Working Directory you have provided (/usr/appl/cie/home/uatcie/bamboo-home/xml-data/build-dir/6651906/JA1-GCHJAV-JOB1/) is not the same as the screenshot suggests.---Kind regards,Rafael P. SperaficoAtlassian Support