Error running delivery init

I’m going through the delivery tutorial for a second time (from scratch), and this time through I am stuck on running delivery init to push the deliver-customers-rhel project to the server for the first time.

Here’s what I am getting. I have checked that admin@test has a valid ssh key for the git server.

Chef Delivery
Loading configuration from /home/christine/delivery2/Development/deliver-customers-rhel
Is /home/christine/delivery2/Development/deliver-customers-rhel a git repo?  yes
adding remote delivery: ssh://admin@test@33.33.33.11:8989/test/Development/deliver-customers-rhel
Remote 'delivery' added to git config!
Creating project: deliver-customers-rhel 
Checking for content on the git remote delivery: got error DeliveryError { kind: GitFailed, detail: Some("STDOUT: \nSTDERR: DELIVERY: ERROR: Unauthorized action\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n\n") }
No upstream content; pushing local content to server.
Creating master pipeline for project: deliver-customers-rhel ... 401 Unauthorized {"error":"token_denied"}
Generating build cookbook skeleton
Cached copy of build cookbook generator exists; skipping git clone.
PCB generate: "chef" "generate" "cookbook" ".delivery/build-cookbook" "-g" "/home/christine/.delivery/cache/generator-cookbooks/pcb"
Git add and commit of build-cookbook
Writing configuration to /home/christine/delivery2/Development/deliver-customers-rhel/.delivery/config.json
New delivery configuration
--------------------------
{
  "version": "2",
  "build_cookbook": {
    "name": "build-cookbook",
    "path": ".delivery/build-cookbook"
  },
  "skip_phases": [],
  "build_nodes": {}
}Chef Delivery
Loading configuration from /home/christine/delivery2/Development/deliver-customers-rhel
Review for change add-delivery-config targeted for pipeline master
Git command failed!
STDOUT: 
STDERR: Pushing to ssh://admin@test@33.33.33.11:8989/test/Development/deliver-customers-rhel
DELIVERY: ERROR: Unauthorized action
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Well, I think I figured it out. Seems that the tutorial is missing an instruction. It’s necessary to do delivery token after doing delivery setup..., to get an API token which is stored in /home/user/.delivery/api-tokens.

Hi @Christine_Draper,

Thanks for reporting, and apologies. I don’t know if it was due to a product change or my own oversight, but I’ve updated the tutorial steps to have the user run delivery token after running delivery init.

Thanks again or reporting and for offering up the solution!

i am getting this error with delivery init: ( I have run the token, have the ssh public key setup in the account on automate). not sure where the priv key should be located though. Is it looking for the private key in specific location and by specific name ?

Git command failed!
STDOUT:
STDERR: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Hi @Christine_Draper
can you please tell me the formate of token we add in api-tokens. I am trying to run delivery cli commands for most of it I am getting

Requesting Token
An HTTP Error occurred
Invalid scheme for Http

and if I try to run delivery token I am getting after adding token in /home/user/.delivery/api-tokens. skipping malformed line: {token: "dsjfndsnf}

Automate 1/Delivery has been for EOL for several years. We do not recommend using it at all as you will be out of support.