semaphoreui / semaphore

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

Problem: Unable to Connect to AzureDevops Git #2271

Open dag-gremache opened 2 months ago

dag-gremache commented 2 months ago

Issue

I have created a new Semaphore instance, and installed it using snap. All works well until i need to connect the Git from Azure Devops.

I have update git, i have setup new keys and new secrets. If i use both methods (SSH, and HTTPS) using the terminal, it works. It does not work through the semaphoreUI.

Impact

Ansible (task execution)

Installation method

Snap

Database

No response

Browser

No response

Semaphore Version

2.10.22-e44910d-1721658299

Ansible Version

No response

Logs & errors

TASK RUN Logs using HTTPS

11:06:16 AM
Task 2147483642 added to queue
11:06:18 AM
Started: 2147483642
11:06:18 AM
Run TaskRunner with template: FortiGate_Config-Backup
11:06:18 AM
Preparing: 2147483642
11:06:18 AM
Cloning Repository https://demo@dev.azure.com/demo/Ansible/_git/Ansible
11:06:18 AM
Unable to clone repository: unexpected client error: unexpected requesting "https://3cnpqjhaglzot3g4bsrhr2rbc7xu7l2xdugapium65kxfiescrfq%40demo@dev.azure.com/demo/Ansible/_git/Ansible/git-upload-pack" status code: 400
11:06:18 AM
Failed updating repository: unexpected client error: unexpected requesting "https://3cnpqjhaglzot3g4bsrhr2rbc7xu7l2xdugapium65kxfiescrfq%40demo@dev.azure.com/demo/Ansible/_git/Ansible/git-upload-pack" status code: 400
11:06:18 AM
Running app failed: unexpected c

TASK RUN Logs using GIT SSH


10:48:27 AM
Task 2147483644 added to queue
10:48:28 AM
Started: 2147483644
10:48:28 AM
Run TaskRunner with template: FortiGate_Config-Backup
10:48:28 AM
Preparing: 2147483644
10:48:28 AM
Cloning Repository git@ssh.dev.azure.com:v3/demo/Ansible/Ansible
10:48:29 AM
Unable to clone repository: object not found
10:48:29 AM
Failed updating repository: object not found
10:48:29 AM
Running app failed: object not found

Manual installation - system information

No response

Configuration

No response

Additional information

No response

Tovervlag commented 2 months ago

Hello dag-gremache,

I first ran into the same problem as you but using your second option using git and using private/public key setup I can at least get that part to work. Maybe try that.

Tovervlag

dag-gremache commented 2 months ago

Hello dag-gremache,

I first ran into the same problem as you but using your second option using git and using private/public key setup I can at least get that part to work. Maybe try that.

Tovervlag

Hello,

I tried that with a clean Ubuntu and snap installation but it did not work.

I ended up using docker instead and that seems to work. But it comes with it's own problems as only public key works (ssh) and not https.

There is something wrong with the snap setup.

Tovervlag commented 2 months ago

Yeah, true, I also only have it configured via ssh atm. Glad you got something to work at least. :)

Icare2000 commented 2 months ago

@fiftin could you check if this issue is not related to that references issue? https://github.com/go-git/go-git/issues/64

it seems this can be fixed and this would help us a lot