无法读取“https://github.com”的用户名:没有这样的设备或地址
我正在使用这个命令使用git
build立一个sudo docker build github.com/roseperrone/myproject
: sudo docker build github.com/roseperrone/myproject
,但是我得到这个错误:
could not read Username for 'https://github.com': No such device or address
我应该如何提供我的git证书?
我正在运行一个AWS ec2实例。
看看代码,看起来好像没有提供凭证的选项,所以我复制了我的id_rsa
键,运行git clone
, cd
d,然后运行docker build .
我有同样的问题,我最近joingithub,但这个bug非常烦人。 我已经成功地修复了它,
首先生成一个SSH密钥并进行身份validation。
删除任何以前的远程地址,如果它不起作用,现在去您的repositiory并复制ssh克隆url。
现在打开input以下命令:
git remote add origin git@github.com:username / your-repo.git
用你的用户名和回购replace用户名和你的回购。
现在尝试推送您的更改,运行以下命令。
git推送起源大师
我希望它会为你工作。
如果有其他人遇到这个问题,需要帮助,在您的Dockerfile中,通过发出以下命令,用您的凭据克隆您的回购:
git clone https://{username}:{password}@github.com/{username}/project.git
我想你需要通过命令行设置gitconfiguration。
请参阅github安装文档: https : //help.github.com/articles/set-up-git#platform-all
$ git config --global user.name "Your Name Here" $ git config --global user.email "your_email@example.com"
等等。