semaphoreui / semaphore

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

Problem: I can't git clone either from a repository in Azure DevOps or a local one #2404

Open kiaz-github opened 1 month ago

kiaz-github commented 1 month ago

Issue

I want to run an Ansible playbook that is in a git repository in Azure DevOps. I configured the repository in SemaphoreUI, I tried both with HTTPS and SSH, I added the credentials and the SSH key in the Key store, but I'm not able to git clone from Azure DevOps.

If I try with HTTPS, the error is:

cloning Repository https://dev.azure.com/xxx/xxx/_git/semaphoreui-automation Unable to clone repository: unexpected client error: unexpected requesting "https://xxx:xxx@dev.azure.com/xxx/xxx/_git/semaphoreui-automation/git-upload-pack" status code: 400 4:37:19 PM Failed updating repository: unexpected client error: unexpected requesting "https://xxx:xxx@dev.azure.com/xxx/xxx/_git/semaphoreui-automation/git-upload-pack" status code: 400 4:37:19 PM Running app failed: unexpected client error: unexpected requesting "https://xxx:xxx@dev.azure.com/xxx/xxx/_git/semaphoreui-automation/git-upload-pack" status code: 400

If I try with SSH, using the URL suggested by Azure DevOps, the error is:

Cloning Repository git@ssh.dev.azure.com:v3/xxx/xxx/semaphoreui-automation Unable to clone repository: object not found Failed updating repository: object not found

Finally, I tried with ssh://, as suggested by the Semaphore doc, but still I have an error:

Cloning Repository ssh://ssh.dev.azure.com:v3/xxx/xxx/semaphoreui-automation Unable to clone repository: parse "ssh://ssh.dev.azure.com:v3/xxx/xxx/semaphoreui-automation": invalid port ":v3" after host Failed updating repository: parse "ssh://ssh.dev.azure.com:v3/xxx/xxx/semaphoreui-automation": invalid port ":v3" after host

What am I doing wrong?

Impact

Ansible (task execution)

Installation method

Snap

Database

Bolt

Browser

Firefox

Semaphore Version

2.10.22-e44910d-1721658299

Ansible Version

No response

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

No response

kiaz-github commented 1 month ago

Finally I tried to use a local path and a git local repository. For the local path the error is: Failed in finding static repository at /opt/git/semaphoreui-automation: stat /opt/git/semaphoreui-automation: no such file or directory Whereas for the git local repository the error which appears is: Unable to clone repository: exec: "git": executable file not found in $PATH

As far as I understand, these two last issues are due to the use of the snap. Can you confirm that if I reinstall everything using the package instead of the snap, I will be able to use the local repositories?

Is it possible that every possible repositories fails?

Can you help me to make one repository work? Any of them.

Thanks in advance.

fiftin commented 1 month ago

@kiaz-github yes, it is snap issue. Yes, it will work.