同样的问题, 在devops pipeline中访问 github.com 也是域名无法解析
https://kubesphere.com.cn/docs/devops-user-guide/how-to-integrate/harbor/#%E5%AE%89%E8%A3%85-harbor
stage('build & push') {
steps {
container ('maven') {
sh 'git clone https://github.com/kstaken/dockerfile-examples.git'
sh 'cd dockerfile-examples/rethinkdb && docker build -t $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:devops-test .'
sh 'docker push $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:devops-test'
}
}
}
}
Cloning into 'dockerfile-examples'...
fatal: unable to access 'https://github.com/kstaken/dockerfile-examples.git/': Could not resolve host: github.com; Unknown error
script returned exit code 128