Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

The Release Azure Pipeline won't deploy to the Chrome Web store because it has trouble authenticating when using secret variables #2

Closed
MarkIannucci opened this issue Oct 12, 2018 · 2 comments

Comments

@MarkIannucci
Copy link
Owner

MarkIannucci commented Oct 12, 2018

I've tried to get this to work using two approaches:

The first approach was a bash task with the script inline. It threw this error:

2018-10-12T09:22:20.4798570Z > Host: www.googleapis.com
2018-10-12T09:22:20.4798876Z > User-Agent: curl/7.47.0
2018-10-12T09:22:20.4799006Z > Accept: */*
2018-10-12T09:22:20.4799088Z > Authorization: Bearer null
2018-10-12T09:22:20.4799403Z > x-goog-api-version: 2
2018-10-12T09:22:20.4799682Z > Content-Length: 0
2018-10-12T09:22:20.4799763Z > 
2018-10-12T09:22:20.5272825Z < HTTP/1.1 401 Unauthorized
2018-10-12T09:22:20.5276434Z < Vary: X-Origin
2018-10-12T09:22:20.5276939Z < WWW-Authenticate: Bearer realm="https://accounts.google.com/", error=invalid_token
2018-10-12T09:22:20.5277354Z < Content-Type: application/json; charset=UTF-8
2018-10-12T09:22:20.5277453Z < Date: Fri, 12 Oct 2018 09:22:20 GMT
2018-10-12T09:22:20.5277592Z < Expires: Fri, 12 Oct 2018 09:22:20 GMT
2018-10-12T09:22:20.5277883Z < Cache-Control: private, max-age=0
2018-10-12T09:22:20.5278196Z < X-Content-Type-Options: nosniff
2018-10-12T09:22:20.5278472Z < X-Frame-Options: SAMEORIGIN
2018-10-12T09:22:20.5279081Z < X-XSS-Protection: 1; mode=block
2018-10-12T09:22:20.5279174Z < Server: GSE
2018-10-12T09:22:20.5279483Z < Alt-Svc: quic=":443"; ma=2592000; v="44,43,39,35"
2018-10-12T09:22:20.5279798Z < Accept-Ranges: none
2018-10-12T09:22:20.5280058Z < Vary: Origin,Accept-Encoding
2018-10-12T09:22:20.5280528Z < Transfer-Encoding: chunked
2018-10-12T09:22:20.5280612Z < 
2018-10-12T09:22:20.5280732Z { [195 bytes data]

The second approach I used was to write the script into a file and execute the file. It throws this error:

2018-10-12T10:01:46.5102062Z /home/vsts/work/r1/a/_MarkIannucci.ChromeUserWebSearchExtension/drop/ChromeWebStoreBashScript.sh: line 4: $'\r': command not found
2018-10-12T10:01:46.5158842Z * Illegal characters found in URL
2018-10-12T10:01:46.5160466Z * Closing connection -1

I am working on this via my #1 pull request. I am able to get this to work using a private azure pipeline where I have the secrets stored in the clear.

@MarkIannucci
Copy link
Owner Author

I reached out to Microsoft via an issue in their VSTS tasks repo.

@MarkIannucci
Copy link
Owner Author

I was able to fix this. My mistake was including a $ in the variable name in the environment variables config section. Removing that fixed this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant