This is slowly driving me crazy. We have an enterprise account, I’m running some JUnit tests and I would like to upload the tests results to my own server, so it’s much easier to browse them.
Basically, all I want do is to call this:
curl -H 'Authorization: Token someToken' -X POST http://my.server.com -F filedata=@file.txt
So this is what I’m trying to do in .travis.yml file.
after_script:
- curl -H 'Authorization: Token someToken' -X POST http://my.server.com -F filedata=@file.txt
The problem is that for the line above I’m getting an error which looks like this:
$ {:"curl -H '\"Authorization"=>"Token someToken\"' -X POST http://my.server.com -F filedata=@file.txt"}
/home/travis/build.sh: line 45: Token someToken"' -X POST http://my.server.com -F filedata=@file.txt}: No such file or directory
This is where I’m stuck and I just get the same error over and over again:
curl -H '"Authorization: Token someToken"'
curl -H "\"Authorization: Token someToken\""
curl -H "'Authorization: Token someToken'"
curl -H '"Authorization": Token someToken'
i feel like being stupid and I know that the fix for this is probably a simple thing, but I’ve felt into that “escape quotes while escaping quotes” thing and if anyone could just point me in the right direction, I would be really grateful.
thank you