Jenkins windows agent gitclone
Budget: $10 – $30 USD
we have linux master jenkins server & two agent one is linux & other is windows
I was able to check out code using linux agent
i get an error if i checkout using windows agent
stderr: Could not create directory '/home/SYSTEM/.ssh'.
no hostkey alg
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Please find sample code below
pipeline {
agent {
label 'windows'
}
stages {
stage('git checkout') {
steps {
git branch: 'main',
credentialsId: 'cerds-github',
url: 'git@ github.com:/repo.git'
}
}
}
}
I was able to check out code using linux agent
i get an error if i checkout using windows agent
stderr: Could not create directory '/home/SYSTEM/.ssh'.
no hostkey alg
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Please find sample code below
pipeline {
agent {
label 'windows'
}
stages {
stage('git checkout') {
steps {
git branch: 'main',
credentialsId: 'cerds-github',
url: 'git@ github.com:/repo.git'
}
}
}
}