【问题标题】:Jenkins could not read Username for 'https://github.****.org': No such device or address git push errorJenkins 无法读取“https://github.****.org”的用户名:没有这样的设备或地址 git push 错误
【发布时间】:2021-05-06 15:34:36
【问题描述】:

我们有一个要求,在 Jenkins 管道中,我们必须提升 NodeJS 包的 npm 版本并执行 git tag git push。

为此,我们所做的是拥有一个 Python 脚本,该脚本将在升级版本之前执行一些任务。 因此我们在 Jenkinsfile 中这样做了

withCredentials([usernamePassword(credentialsId: 'username', passwordVariable: 'adminPass', usernameVariable: 'adminUser')]) {
            sh "echo https://$adminUser:$adminPass@github**** > ~/.git-credentials"
            sh "git config --local credential.helper store --file=~/.git-credentials"

但是每次我们从 python 脚本中执行 push 命令时,都会出现这个错误

could not read Username for 'https://github.****.org': No such device or address

问题是简单的错误,但是当我们尝试用谷歌搜索该问题时,我们得到了各种各样的解决方案,但都不起作用..

【问题讨论】:

    标签: jenkins


    【解决方案1】:

    对于那些被卡住的人,只需检查您的用户名或密码中是否没有“@”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-09-24
      • 2013-03-22
      • 2019-07-18
      • 2019-06-24
      • 1970-01-01
      • 1970-01-01
      • 2021-10-23
      相关资源
      最近更新 更多