bitbucketを使いソース管理をし、macのローカルから、ansibleを使用してubuntuサーバにプログラムを更新しています。
現在は、リポジトリを公開にして、ansibleを実行しているのですが、リポジトリを非公開のままで、ansibleを実行することはできないのでしょうか?
現在は非公開のままでansibleを行うと、以下のエラーになります。
TASK: [git repo=git@bitbucket.org:xxxxxxxxx/xxxxxxxxx.git dest=/xxx/xxx/xxxxxxx key_file=/home/xxxxxxx/.ssh/deploy.key ssh_opts="-o StrictHostKeyChecking=no" update=yes force=yes ] *** failed: [xxxxxxxxxx_vm1] => {"cmd": "/usr/bin/git ls-remote origin -h refs/heads/master", "failed": true, "rc": 128} stderr: repository access denied. deployment key is not associated with the requested repository. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. msg: repository access denied. deployment key is not associated with the requested repository. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. FATAL: all hosts have already failed -- aborting
公開にしておくと、外部からソースがすべて見ることができてしまうので、ansibleを実行するときだけ、公開にし、通常は非公開にしております。
macのローカルからは、リポジトリが非公開のままでも、git pushなどはできます。
同じような方法で使用している方がいらっしゃいましたら、ご教授ください。
回答3件
あなたの回答
tips
プレビュー