2017-03-03 101 views
1

我有,我用它來創建Kubernetes部署,其中包括一個YAML文件:無法克隆的git到Kubernetes gitRepo量

volumeMounts: 
    - name: git-volume 
     mountPath: /code 
    volumes: 
    - name: git-volume 
    gitRepo: 
     repository: "[email protected]:organization/bot.git" 
     revision: "b686122a44aa271117b602e4eba4cc02f5e56044" 

我有一個公開的Git到位桶回購(我可以查看它沒有記錄進入Bitbucket)。

在Kubernetes開始部署時,我得到這個錯誤:

failed to exec 'git clone [email protected]:organization/bot.git': Cloning into 'bot'... Could not create directory '/root/.ssh'. 
Failed to add the host to the list of known hosts (/root/.ssh/known_hosts). 
Permission denied (publickey). 
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. : exit status 128 

我怎樣才能得到這個回購克隆?

回答