jenkins'de Github Organisation
ürün var. Benim depo kökünde, benim Jenkinsfile
şöyle görünür:Github organizasyonunda ssh uzaklığını nasıl kontrol edebilirsiniz Jenkins iş akışında ve ssh kimlik bilgilerini Jenkinsfile'de kullanın
: o anda aşağıdaki hata ilefatal: could not read Username for ' https://github.com ': No such device or address
git fetch
parçası üzerinde başarısız oluyor birkaç burada test depo erişimi için hatlar ve
var node {
def jenkinsCredsId = 'xxxxxxxx-yyyy-zzzz-aaaa-bbbbbbbbbbbb'
stage 'Checkout'
checkout scm
// I also tried the following:
// checkout scm: [$class: 'GitSCM', source: 'ssh://[email protected]:MY_ORGANISATION/jenkins-testing-temp.git', clean: true, credentialsId: jenkinsCredsId]
stage 'Build'
// generate some artefact (dist.zip)
stage 'Release'
sshagent([jenkinsCredsId]) {
sh '''
git remote -v // show remotes
ssh-add -l // show currently loaded ssh keys fingerprints
git fetch --all --tags // IT FAILS HERE
CURRENT_BUILD_TAG="some_build/${BUILD_NUMBER}"
git tag ${CURRENT_BUILD_TAG}
git push --tags
github-release release \
--security-token ${GITHUB_RELEASE_TOKEN} \
--user MY_ORGANIZATION \
--repo MY_REPO \
--tag ${CURRENT_BUILD_TAG} \
--name ${CURRENT_BUILD_TAG}
github-release upload \
--security-token ${GITHUB_RELEASE_TOKEN} \
--user MY_ORGANIZATION \
--repo MY_REPO \
--tag ${CURRENT_BUILD_TAG} \
--name ${CURRENT_BUILD_TAG} \
--file dist.zip
'''
}
Yukarıdaki Jenkinsfile
'dan gelen git remote -v
komutu, origin https://github.com/MY_ORGANIZATION/MY_REPO
gibi bir çıktı verir.
Benim Github Organization
git yapılandırma şuna benzer:
Birkaç ilgili sorular bulundu: