Hey @ayan.biswas,
Thank you for sending us those logs through and for also checking permissions on the account with the API key.
Can you confirm your Octopus Server version for me as I did see was you are using a very old version of our ADO plugin and I want to make sure that is compatible with your Octopus Server version, we have a compatibility guide here - you need to be looking for the Octopus CLI version and it seems you are using version 4.30.7 which is only compatible with Octopus 2018.2 ➜ 2018.12.
It looks like your build logs show the push command does not include a space ID (spaces were introduced in 2019.1):
##[command]"E:\ADOPool-Agent1\_work\_tasks\OctopusPush_d05ad9a2-5d9e-4a1c-a887-14034334d6f2\2.0.95\Octo.exe" push --server=http://xxxxxxx/octopus/ --apiKey=*** --package="\\xxxxxxxx.zip"
On mine the push command looks like this:
C:\ProgramData\chocolatey\bin\octo.exe push --space Spaces-1 --overwrite-mode FailIfExists --enableServiceMessages --package C:/agent/_work/4/a/target/RandomQuotesADOLocalMaven.0.1.9.jar --server http://192.168.0.201/ --apiKey ***
This should not matter as long as you have the default space selected for the pipeline, are you able to confirm you do have that space selected:
Can you also confirm the account used for the API key is not scoped to a particular space for the Octopus Manager permission as if it is you might be trying to push the package to a space that the API key does not have permissions for.
Taking a look at the logs the error occurs on the push package but there are no other steps that connect to the Octopus Server before that so its hard to tell if the service connection is actually working correctly or not.
Can you make sure you have the ‘Grant Access to all pipelines
’ box ticked for your service connections and the API key actually starts with API-
IE API-FIII8NDOXXXXXXXXXXXXXM6NNNUOMDS
.
If all of those settings are correct I was wondering if you could try this outside of ADO and run it on a machine that has access to the Octopus Server (you could run it on the Octopus server if you have access).
All ADO is doing is using the Octopus CLI to push a package to Octopus using the Push command.
Would you be able to install the Octopus CLI on a machine that can access the Octopus Server and try running a very simple command such as Listing Environments.
If you get the same error there is definitely something wrong with that API key as we would have taken ADO and networking (if running on the Octopus Server) out of the equation.
You can download the Octopus CLI here but it only goes back to version 7.0 so if this works you may need to upgrade your ADO plugin using the compatibility documentation I posted up to the correct version for your Octopus server version.
The first thing I would do here is see if your Octopus Server version is indeed compatible with the Octopus CLI version you are using as unless you are still running Octopus Server 2018 you will need to start by upgrading your ADO plugin to get the new Octopus CLI version (that linked documentation goes through how to use the Octopus CLI in your build pipelines).
Let me know if you have any questions about what I mentioned as I realise there is a lot of information to digest here.
Kind Regards,
Clare