# Error after seemingly successful deployment

**URL:** <https://community.okteto.com/t/error-after-seemingly-successful-deployment/963>\
**Category:** Help\
**Created:** [July 27, 2023, 11:26am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963 "2023-07-27T11:26:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannymcerlean1](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/dannymcerlean1/32/440_2.png) [@dannymcerlean1](https://community.okteto.com/u/dannymcerlean1)\
**Post date:** [July 27, 2023, 11:26am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/1 "2023-07-27T11:26:26Z")

</div>

Hi,

I am trialing okteto self-hosted on EKS. I have an app which deploys a dependency from a private repo. When the dependency is deployed, it appears to succeed (deployments, config maps etc are created) but the pipeline reports as failed with this message:  
`deploy command failed: exit status 1`

I noticed in the installer logs several messages like this:  
`W0727 10:21:38.234061 7 warnings.go:70] unknown field "spec.variables[0].masked"`

I have no idea if this is related but my repo is in Azure devops, and to checkout using ssh from there I had to add the following deploy command:  
`"GIT_SSH_COMMAND=ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa" >> $OKTETO_ENV`

I also noticed there is no integration for preview environments for azure devops. I would have to implement this myself. How can I add the git ssh command above to `okteto pipeline deploy`?

EDIT:  
This only happens when I deploy using GIT\_SSH\_COMMAND. It’s fine if I deploy from a public github repository.

Any help appreciated.

Thanks,  
Danny

---

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [July 28, 2023, 12:20am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/2 "2023-07-28T00:20:04Z")

</div>

Hey @dannymcerlean1 !

Have you tried giving [Okteto permissions to check out your repo](https://www.okteto.com/docs/administration/private-repositories/ssh-key/)? This might eliminate the need for you to override the $GIT\_SSH\_COMMAND.

If that doesn’t work, would you mind sharing a screenshot or screencast of what you are running into?

---

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [July 28, 2023, 12:22am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/3 "2023-07-28T00:22:56Z")

</div>

> [@dannymcerlean1](#):
>
> I also noticed there is no integration for preview environments for azure devops

We are working on docs for this! But hight level, what you need to do from Azure Devops is to call the [`okteto preview deploy` command](https://www.okteto.com/docs/reference/cli/#deploy-2) and Okteto will take it from there.

Happy to set up a live session to help you hook it up while our docs our ready. Feel free to DM me!

---

<div class="post-metadata">

**Author:** ![dannymcerlean1](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/dannymcerlean1/32/440_2.png) [@dannymcerlean1](https://community.okteto.com/u/dannymcerlean1)\
**Post date:** [July 28, 2023, 2:18pm UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/4 "2023-07-28T14:18:07Z")

</div>

Thanks for getting back to me. I did add an ssh key in azure devops for okteto, without adding that the checkout fails. Without GIT\_SSH\_COMMAND the error that we have is:  
`Unable to negotiate with <IP> port 22: no matching host key type found. Their offer: ssh-rsa`

This document mentions [updating ssh config](https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops#questions-and-troubleshooting). Is there a way to do that for okteto?

---

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [July 28, 2023, 7:16pm UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/5 "2023-07-28T19:16:16Z")

</div>

Is there something special about your azure devops installation? I tried reproducing the issue on our azure devops account and wasn’t able to reproduce the issue.

 ![IMG_6102](https://us1.discourse-cdn.com/flex019/uploads/okteto/original/1X/13d547cc752f72f6387c5bd703b2d8620776296c.png)

---

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [July 29, 2023, 8:16pm UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/6 "2023-07-29T20:16:02Z")

</div>

> [@dannymcerlean1](#):
>
> This document mentions [updating ssh config](https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops#questions-and-troubleshooting). Is there a way to do that for okteto?

You can follow [these instructions](https://www.okteto.com/docs/self-hosted/administration/custom-installer-image/) to customize the container that Okteto uses during the check out and deployment of your environment. With this, you could create a container that has the updated ssh-config as the article describe.

[I created this sample repo, in case it helps!](https://github.com/rberrelleza/okteto-azuredevops).

---

<div class="post-metadata">

**Author:** ![dannymcerlean1](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/dannymcerlean1/32/440_2.png) [@dannymcerlean1](https://community.okteto.com/u/dannymcerlean1)\
**Post date:** [August 1, 2023, 10:03am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/7 "2023-08-01T10:03:51Z")

</div>

That guide is exactly what I needed, thank you. I should have noticed that before, sorry. The solution for me was to use a custom installer image with this line:

```auto
RUN echo "HostKeyAlgorithms = +ssh-rsa\nPubkeyAcceptedAlgorithms = +ssh-rsa" >> /etc/ssh/ssh_config

```

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![benjoldersma](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/benjoldersma/32/220_2.png) [@benjoldersma](https://community.okteto.com/u/benjoldersma)\
**Post date:** [August 3, 2023, 8:19pm UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/8 "2023-08-03T20:19:02Z")

</div>

Not sure if this is related, or if I should start a separate thread, but I’m also seeing an exit command falied after a seemingly succesful okteto deploy:

I’m printing out the exit code from helm upgrade, which is the last line in my deploy block in the config.yaml:

```auto
Exit code: 0
deploy command failed: exit status 1

```

is what I see in the okteto log.

so, it seems helm runs correctly, but something after that (which i have no more lines of our code after) seems to be failing.

Things were running okay previously with this repo, and are running okay with a peer to this repo in another okteto manifest.

---

<div class="post-metadata">

**Author:** ![jLopezbarb](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/jlopezbarb/32/48_2.png) [@jLopezbarb](https://community.okteto.com/u/jLopezbarb)\
**Post date:** [August 7, 2023, 10:32am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/9 "2023-08-07T10:32:13Z")

</div>

Hi @benjoldersma,

It seems like another issue. Could you open another support issue trying to provide more context like an okteto manifest or okteto version in order to be able to reproduce it and fix it? If you could also add the result of running `okteto deploy --log-level=debug` it would be perfect.

---

<div class="post-metadata">

**Author:** ![benjoldersma](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/benjoldersma/32/220_2.png) [@benjoldersma](https://community.okteto.com/u/benjoldersma)\
**Post date:** [August 7, 2023, 2:51pm UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/10 "2023-08-07T14:51:12Z")

</div>

Will do, but before I do, is there a way to configure the preview action in github to run a deploy with log level debug? (I forgot to mention that this only happen in preview environments)

---

<div class="post-metadata">

**Author:** ![jLopezbarb](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/jlopezbarb/32/48_2.png) [@jLopezbarb](https://community.okteto.com/u/jLopezbarb)\
**Post date:** [August 8, 2023, 7:18am UTC](https://community.okteto.com/t/error-after-seemingly-successful-deployment/963/11 "2023-08-08T07:18:51Z")

</div>

I’m sorry but right now it’s not possible. If it only happen in a preview environment you should provide the name of the preview in case it was something on our to investigate the root of the cause
