Authentication or permission failure

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Authentication or permission failure相关的知识,希望对你有一定的参考价值。

容器里使用ansible 项目报错

PLAY [bootstrap installer] ****

GATHERING FACTS ***
fatal: [localhost] => Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in "/tmp". Failed command was: mkdir -p $HOME/.ansible/tmp/ansible-tmp-1403661775.03-87881370436819 && echo $HOME/.ansible/tmp/ansible-tmp-14036534175.03-87881370436819, exited with result 127

处理方法:

#yum -y install openssh-clients

Ansible正在容器中运行,试图连接到容器,因此您需要同时授权容器和root用户.容器必须是已知主机,并且必须授权root的公钥.例如:
RUN ssh-keyscan -t rsa 127.0.0.1 >>/root/.ssh/known_hosts
RUN cat /root/.ssh/id_rsa.pub >>/root/.ssh/authorized_keys

以上是关于Authentication or permission failure的主要内容,如果未能解决你的问题,请参考以下文章

django(权限认证)系统—— 基于Authentication backends定制

Laravel 5.1 @can,如何使用 OR 子句

[Cloudera][ImpalaJDBCDriver](500164)Error initialized or created transport for authentication

Bad owner or permissions on .ssh/config的解决

remote: Incorrect username or password ( access token ) fatal: Authentication failed for

Bad owner or permissions on $HOME/.ssh/config