Jenkins - could not read Username for 'https://github.com': No such device or address

若如初见. 提交于 2019-12-23 03:10:55

问题


I'm trying to set up Jenkins / Hudson on my Ubuntu PC. That's not the problem but I set an Android job with the following commands:

export CLEAN=false
export LUNCH=cm_ace-userdebug
export REPO_BRANCH=cm-10.1
export RELEASE_TYPE=CM_NIGHTLY
curl -O https://raw.github.com/CyanogenMod/hudson/master/job.sh
. ./job.sh

The job stops after a few seconds because of the error:

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

How do I fix this error? Please help!


回答1:


I suspect that Jenkins is attempting to open "/dev/tty" or something to ask you for a user name and password. That is failing because Jenkins is running as a daemon ... and "/dev/tty" can't be used in that context. The "No such device or address" comes from the failed attempt to open "/dev/tty".

The solution would be to configure the job to use a specific private key for the fetch. Read the curl manual entry and check out the -E option. Alternatively, you could use -u and specify the username and password in the curl command.



来源:https://stackoverflow.com/questions/15736088/jenkins-could-not-read-username-for-https-github-com-no-such-device-or-ad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!