Copying a file from the build server to local for debugging

Hi,

I’m trying to track down why one particular test is failing in my CircleCI environment. I’m using Chromedriver, so I’ve SSHed into the CircleCI box and adjusted my code to take a screenshot at a particular time, however, I need to copy the file from the CI box to my local machine to view it.

I’ve tried scping the file like so:

scp -p 64539 107.23.248.98:/home/circleci/wearefuturegov/local-offer/tmp/capybara/capybara-201807110928188272235753.

But I get the error:

stuart@107.23.248.98: Permission denied (publickey).
lost connection

Any ideas? I can SSH in just fine

Cheers

Would storing it as an artifact be of any use to you? If it’s a screenshot, html etc, it’ll be viewable from the browser after being uploaded as an artifact.

Assuming your file is called capybara-201807110928188272235753, you’ll need a space before the . to make that command work. You don’t have a destination parameter presently.

Ah, check this as well - I can’t remember what user is required with SSH, but I imagine it’s not likely to match up with the user in your local machine.

Assuming your file is called capybara-201807110928188272235753, you’ll need a space before the . to make that command work. You don’t have a destination parameter presently.

Yeah, I think that was a bad copy paste job. The file is a png, and I had the destination there, I just didn’t select it all

Ah, check this as well - I can’t remember what user is required with SSH, but I imagine it’s not likely to match up with the user in your local machine.

That occurred to me just after posting this, I tried circleci@, and I got the same error :confused:

That all said, I like @Cormac’s suggestion of using build artifacts. I’ll give that a go :slight_smile:

2 Likes

Yup the easiest thing is to just store it as an artifact and then it’ll available after the build.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.