Curl not working properly when i push the package from centos to octopus

curl not working properly when i push the package from centos to octopus.

i have admin rights to the machine.

error: {
“ErrorMessage”: “You must be logged in to request this resource or provide a valid API key. Your account may have been disabled, please contact your Octopus administrator.”,
“Errors”: []

  • Closing connection 0
    }

Hi Sudheer,

Thanks for getting in touch! This error generally means that Octopus could not verify the API key you supplied for the command.

Would you be able to post the command you are running where you see this error?

Looking forward to hearing from you. :slight_smile:

Best regards,

this is the command which i am using…

curl -X POST http://octodeploy.ellevationdev.com/api/packages/raw -H “X-OctopusApiKey: API-FGGGGTYUHUHUTGFGLIGLUKGF” -F “data=@/home/centos/Octopus_Ansible.2.0.0.zip”

Hi Sudheer,

Thanks for getting back with the command. From what I can see your command looks fine here. The problem may be related to permissions.

Can you confirm that the Octopus account which you are using the API key for has permission to push packages to the Octopus server?

You will need to make sure that the user is a member of a team which has the BuiltInFeedPush permission and that they have access to any project where this package is used in.

If this all looks fine on your Octopus server, could you run a Test Permissions for the account you are using to push the package, then attach the output file in your next response?

Let me know if this helps. :slight_smile:

Best regards,
Daniel

Hi Daniel,

I did check my permissions and i have BuiltInFeedPush permission also.
i ran quickly Test Permissions and i have below
Permissions_export_2018_03_12__14_31_22_UTC.csv (2.2 KB)

Thanks,
Sudheer.

Hi Sudheer,

I’m very sorry for such a delayed reply here. Your response fell through the cracks and I overlooked it. Are you still having trouble with pushing packages to your Octopus server with curl?

Did you manage to resolve this issue on your own?

Let me know if you would still like some help. I’ll make sure to help you get this working as a priority.

Again, I’m very sorry that I failed to get back to you here.

Best regards,
Daniel

Hi Daniel,

Still the issue is pending. i uploaded the output/error screenshots earlier. please check it and help me.

Thanks,
Sudheer.

Hi Sudheer,

Thanks for getting back. Your permissions look fine. However, I have only just noticed something in the curl command you have pasted above.

curl -X POST http://octodeploy.ellevationdev.com/api/packages/raw -H “X-OctopusApiKey: API-FGGGGTYUHUHUTGFGLIGLUKGF” -F “data=@/home/centos/Octopus_Ansible.2.0.0.zip”

I can see when you call the API, you are using the following X-OctopusApiKey. Would you be able to try the command with a dash between Octopus and ApiKey X-Octopus-ApiKey. It could be the reason the error is pointing to an issue with the API key.

Let me know if this helps.

Best regards,
Daniel