semaphoreui / semaphore

Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools.
https://semaphoreui.com
MIT License
10.47k stars 1.06k forks source link

Problem: Failed to install inventory: parsing private key: ssh: no key found #2128

Open sfenzke opened 4 months ago

sfenzke commented 4 months ago

Issue

My tasks fail while trying to install the inventory. I am using not using additional runners so all tasks are run locally.

Impact

Ansible (task execution)

Installation method

Docker

Database

BoltDB

Browser

Chrome, Safari

Semaphore Version

2.10.7

Ansible Version

No response

Logs & errors

task output:

4:16:35 PM
Task 2147483635 added to queue
4:16:37 PM
Started: 2147483635
4:16:37 PM
Run TaskRunner with template: deploy_app_FKB
4:16:37 PM
Preparing: 2147483635
4:16:37 PM
Updating Repository https://bitbucket.adesso-group.com/scm/acid/deployment.git
4:16:37 PM
From https://bitbucket.adesso-group.com/scm/acid/deployment
4:16:37 PM
 * branch            main       -> FETCH_HEAD
4:16:38 PM
Already up to date.
4:16:38 PM
Failed to install inventory: parsing private key: ssh: no key found
4:16:38 PM
Running playbook failed: parsing private key: ssh: no key found 

docker compose -p semaphore logs:

semaphore  | No additional system dependencies to install
semaphore  | No additional python dependencies to install
semaphore  | Starting semaphore server
semaphore  | Loading config
semaphore  | Validating config
semaphore  | BoltDB /var/lib/semaphore/database.boltdb
semaphore  | Tmp Path (projects home) /tmp/semaphore
semaphore  | Semaphore v2.10.7-6bcf476-1718821016
semaphore  | Interface
semaphore  | Port :3000
semaphore  | Server is running
semaphore  | time="2024-06-21T14:16:35Z" level=info msg="Task 2147483635 added to queue"
semaphore  | time="2024-06-21T14:16:37Z" level=info msg="Set resource locker with TaskRunner 2147483635"
semaphore  | time="2024-06-21T14:16:37Z" level=info msg="Task 2147483635 removed from queue"
semaphore  | time="2024-06-21T14:16:38Z" level=info msg="Stopped running TaskRunner 2147483635"
semaphore  | time="2024-06-21T14:16:38Z" level=info msg="Release resource locker with TaskRunner 2147483635"

Manual installation - system information

No response

Configuration

Task Configuration:

image

Additional information

No response

fiftin commented 4 months ago

Please try v2.10.8-beta.

sfenzke commented 3 months ago

I bumped there Version up to 2.10.8-bet as suggested but unfortunately I still hav the same issue.

12:21:05 PM
Task 2147483634 added to queue
12:21:06 PM
Started: 2147483634
12:21:06 PM
Run TaskRunner with template: deploy_app_FKB
12:21:06 PM
Preparing: 2147483634
12:21:06 PM
Cloning Repository https://bitbucket.adesso-group.com/scm/acid/deployment.git
12:21:06 PM
Cloning into 'repository_1_3'...
12:21:18 PM
Failed to install inventory: parsing private key: ssh: no key found
12:21:18 PM
Running playbook failed: parsing private key: ssh: no key found
fiftin commented 3 months ago

Please try to re-enter your keys. Looks like it is broken. It is not first report but I can't reproduce.

sfenzke commented 3 months ago

Hello @fiftin,

I tried to do this. I even did a clean redeploy of Version 2.10.8-beta but unfortunately I still have the same issue.

Greeting

rbagia commented 3 months ago

any solution here? i have exactly the same problem: Failed to install inventory: parsing private key: ssh: no key found I installed as docker, also local, every time the same

image: docker.io/semaphoreui/semaphore:v2.10.11

hyperbu42 commented 3 months ago

Same issue for me on v2.10.11-d31ebd3-1719395023

hyperbu42 commented 3 months ago

Same issue for me on v2.10.11-d31ebd3-1719395023

Igore this - I was creating a new automation user and messed up the format of the private key (with passphrase) when exporting from PuttyGen

elliotnev27 commented 2 months ago

Update: Disregard, I was originally making my ssh keys in my password manager, which seems to be the issue. I remade on my Mac with ssh-keygen and those worked perfectly.

I've running into the same issue on Semaphore v2.10.22-e44910d-1721658299 with docker and using the RPM on Rocky 9.4.

12:25:22 PM Task 2147483644 added to queue
12:25:25 PM Started: 2147483644
12:25:25 PM Run TaskRunner with template: FOO
12:25:25 PM Preparing: 2147483644
12:25:25 PM Cloning Repository ***************************************
12:25:25 PM Failed updating repository: parsing private key: ssh: no key found
12:25:25 PM Running app failed: parsing private key: ssh: no key found

I've tried making new keys and re-writing keys, but have the same message. I can see with boltbrowser that the entries for my SSH keys are getting made.

I am able to update the inventory if I use Login with Password. But I get the same message when trying to download repo with the playbook. I can get around that if the repo via HTTPS (no password) and local paths.

I've tried a few different configs, but here is the latest attempt: Config file:

{
        "mysql": {
                "host": "",
                "user": "",
                "pass": "",
                "name": "",
                "options": null
        },
        "bolt": {
                "host": "/tmp/database.boltdb",
                "user": "",
                "pass": "",
                "name": "",
                "options": null
        },
        "postgres": {
                "host": "",
                "user": "",
                "pass": "",
                "name": "",
                "options": null
        },
        "dialect": "bolt",
        "port": "3000",
        "interface": "",
        "tmp_path": "/tmp/semaphore",
        "ssh_config_path": "",
        "git_client": "",
        "web_host": "",
        "cookie_hash": "*******************",
        "cookie_encryption": "*******************",
        "access_key_encryption": "*******************",
        "email_alert": false,
        "email_sender": "",
        "email_host": "",
        "email_port": "",
        "email_username": "",
        "email_password": "",
        "email_secure": false,
        "ldap_enable": false,
        "ldap_binddn": "",
        "ldap_bindpassword": "",
        "ldap_server": "",
        "ldap_searchdn": "",
        "ldap_searchfilter": "",
        "ldap_mappings": {
                "dn": "",
                "mail": "",
                "uid": "",
                "cn": ""
        },
        "ldap_needtls": false,
        "telegram_alert": false,
        "telegram_chat": "",
        "telegram_token": "",
        "slack_alert": false,
        "slack_url": "",
        "rocketchat_alert": false,
        "rocketchat_url": "",
        "microsoft_teams_alert": false,
        "microsoft_teams_url": "",
        "oidc_providers": null,
        "max_task_duration_sec": 0,
        "max_tasks_per_template": 0,
        "max_parallel_tasks": 0,
        "runner_registration_token": "",
        "password_login_disable": false,
        "non_admin_can_create_project": false,
        "use_remote_runner": false,
        "runner": {
                "api_url": "",
                "registration_token": "",
                "config_file": "",
                "one_off": false,
                "webhook": "",
                "max_parallel_tasks": 0
        },
        "global_integration_alias": "",
        "apps": null
 }