azure-devopsflux

how to add azure devops repo as flux source


I'm trying to add azure devops repo as source for flux using SSH authentication. Im using below command :

flux create source git test-gitrepo --url="ssh://<user>@vs-ssh.visualstudio.com/<org>/<orgname with space>/reponame" --branch=master --private-key-file=./private-key

But im getting "ssh: handshake failed: EOF" error.

As orgname has space in its name, I tried keeping url in double quotes, I kept %20 instead of space. But in all of the cases same error is coming.

Can somebody tell me how to add repo in flux.

I bootstrapped flux with devops PAT.


Solution

  • To install Flux on an AKS cluster using an Azure DevOps Git repository as the source of truth, you can use the flux bootstrap git command.

    To bootstrap using a SSH key instead of a Azure DevOps PAT, run:

    flux bootstrap git \
      --url=ssh://git@ssh.dev.azure.com/v3/<org>/<project>/<repository>
      --branch=<my-branch> \
      --private-key-file=<path/to/ssh/private.key> \
      --password=<key-passphrase> \
      --path=clusters/my-cluster
    

    See Flux bootstrap for Azure DevOps for details.

    UPDATE:

    As santosh.a clarified, it turned out that port 22 was blocked by the firewall. The issue was resolved after opening port 22 in the firewall.