-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SSH authentication for git artifacts #793
Comments
This workaround worked for me: apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: git-clone-template
spec:
entrypoint: clone-and-do-stuff
arguments:
parameters:
- name: revision
value: master
volumes:
- name: ssh-key
secret:
defaultMode: 0400
secretName: github-creds
volumeClaimTemplates:
- metadata:
name: workdir
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
templates:
- name: clone-and-do-stuff
steps:
- - name: provision
template: git-clone
- - name: stuff
template: do-stuff
- name: git-clone
container:
image: alpine/git
workingDir: /src
command: [sh, -c]
args: [ "git clone -b {{workflow.parameters.revision}} --single-branch git@github.com:org/repo.git" ]
volumeMounts:
- name: ssh-key
mountPath: "/root/.ssh"
- name: workdir
mountPath: /src
- name: do-stuff
container:
image: other/container
workingDir: /src/repo
volumeMounts:
- name: workdir
mountPath: /src
kubectl create secret generic github-creds --from-file=~/.ssh/id_rsa --from-file=~/.ssh/known_hosts |
#919 this does all 3 basic auth private key and plain using go-git |
@alexmt can you check it out and merge if all good? |
@jessesuen this can be closed with #919 merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a BUG REPORT or FEATURE REQUEST?:
FEATURE REQUEST
What happened:
HTTPS and password authentication might be disabled. Argo should support authentication using ssh key.
What you expected to happen:
It should be possible to define git artifact using 'git@' url and ssh key secret:
The text was updated successfully, but these errors were encountered: