A project named ... could not be found when using Octo.exe to deploy

Hi there,
Currently evaluating Octopus and one of my key requirements is that I can deploy automatically from my build system. So with that in mind, once I got the basic portal and tentacle setup and managed at least one manual deploy, was to evaluate the octo.exe tool to facilitate a command line deploy.

However, I have failed at the first hurdle: Octo.exe fails with the error message: “A project named ‘OTU’ could not be found”, despite the fact that a project named OTU does in fact exist in the server:

PS C:\Temp\OctopusDeploy-Octopus-Tools-d0e9473\source\OctopusTools\bin> .\Octo.exe create-release --project=OTU --server=http://msw2k8buildsvr:8080/api --apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Octopus Command Line Tool, version 1.0.0.0

Finding project: OTU
Handshaking with Octopus server: http://msw2k8buildsvr:8080/api
Handshake successful. Octopus version: 1.0.24.1316; API version: 1.0.0
Argument error:
A project named 'OTU' could not be found.

Am using Octopus version 1.0.24.1316 combined with version 1.0.15.42 of Octo.exe source code from github.

Please see attached a screen shot that will show (I think) that I am using the right settings, and shows that I did manage a manual deploy via the portal I know Octo.exe works and communicate with the server because when I call “list-environments” it does return data:

PS C:\Temp\OctopusDeploy-Octopus-Tools-d0e9473\source\OctopusTools\bin> .\Octo.exe list-environments --server=http://msw2k8buildsvr:8080/api --    apiKey=xxxxxxxxxxxxxxxxxxxxxx
Octopus Command Line Tool, version 1.0.0.0

Handshaking with Octopus server: http://msw2k8buildsvr:8080/api
Handshake successful. Octopus version: 1.0.24.1316; API version: 1.0.0
Environments: 1
 - OTU TEST 1 (ID: DeploymentEnvironments-1)

The API key I am using is the one that is associated with my user (the one that managed the deploy)

Any tips would be appreciated!

Hi Peter,

What do you see if you browse to

http://msw2k8buildsvr:8080/api/projects

In your web browser?

Paul

Sent from my Windows Phone


From: Peter McEvoy
Sent: 09/08/2012 13:32
To: Paul Stovell
Subject: A project named … could not be found when using Octo.exe to deploy [Problems #537]

Thanks for quick response! I see the following json:

[
  {
    "Id": "projects-1",
    "Name": "OTU ",
    "Description": "",
    "Links": {
      "Self": "/api/projects/projects-1",
      "Releases": "/api/projects/projects-1/releases",
      "Variables": "/api/projects/projects-1/variables",
      "Steps": "/api/projects/projects-1/steps",
      "Web": "/projects/show/projects-1"
    }
  }
]

Ahhhh…
I see the issue - seems like a trailing space in the JSON for the name. Perhaps I created the project with a trailing space… (although that sounds like the server should Trim() the input…).

Confirmed: if I use
–project="OTU "
then it seems to deploy.

I can work with this for now, but perhaps this is a input bug you could add to your backlog?

Thanks Peter, yep, I’ll fix this in both the command line and the server so that the name is always trimmed.

Paul

Hi Peter,

This is now fixed:

Paul

Hi Paul, I installed this build (1.0.25) and when accessing the portal, got internal server error.

I needed to edit the web.config and remove the <httpErrors errorMode="Detailed" /> element for it to work

Thanks Peter, I added that to help debug another issue but I guess it might not be supported in all versions of IIS - I will remove it in the next release.

Thanks again,

Paul

Hi Peter,

This is now fixed:

Paul