Add your own cloud fails on macos

Mark Ts's Avatar

Mark Ts

13 Jan, 2020 09:12 PM

I'm trying to add my own cloud for building on local MacOS machine but it fails with the following error

Connect-AppVeyorToComputer -AppVeyorUrl https://ci.appveyor.com -ApiToken SomeToken                          

Checking AppVeyor API access...
WARNING: Unable to call AppVeyor REST API, please verify 'ApiToken' and ensure '-AppVeyorUrl' parameter is set if you are using on-premise AppVeyor Server.

here is output with -verbose option

Checking AppVeyor API access...
VERBOSE: GET https://ci.appveyor.com/ with 0-byte payload
VERBOSE: received 7917-byte response of content type text/html
VERBOSE: GET https://ci.appveyor.com/api/projects with 0-byte payload
VERBOSE: received 76-byte response of content type application/json
WARNING: Unable to call AppVeyor REST API, please verify 'ApiToken' and ensure '-AppVeyorUrl' parameter is set if you are using on-premise AppVeyor Server.
so question are
1) does this functionality works at all?
2) if so what could be a problem? All commands and Token are taken from https://ci.appveyor.com/build-clouds/wizard
3) Why payload is 0-byte
  1. Support Staff 1 Posted by Feodor Fitsner on 13 Jan, 2020 09:21 PM

    Feodor Fitsner's Avatar

    Hi Mark,

    Could you try running this script with your token and see what error you are getting:

        $apiToken = '<your-token>'
        $headers = @{
          "Authorization" = "Bearer $apiToken"
          "Content-type" = "application/json"
        }
        Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects" -Headers $headers -Method Get
    
  2. 2 Posted by Mark Ts on 18 Jan, 2020 11:37 AM

    Mark Ts's Avatar

    Thank you Feodor,

    You gave me a hint how to resolve this. I've tried snippet you suggested and saw that Auth method is not allowed so I've checked security settings and turned on
    API v1 & API v2 auth and after that was able to setup own build agent with pwsh cmdlet

  3. Support Staff 3 Posted by Feodor Fitsner on 19 Jan, 2020 02:53 AM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac