Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 无法将repo从Google云源存储库克隆到使用Cloud NAT配置的计算引擎实例_Google Cloud Platform_Google Compute Engine_Nat_Google Cloud Source Repos_Google Cloud Router - Fatal编程技术网

Google cloud platform 无法将repo从Google云源存储库克隆到使用Cloud NAT配置的计算引擎实例

Google cloud platform 无法将repo从Google云源存储库克隆到使用Cloud NAT配置的计算引擎实例,google-cloud-platform,google-compute-engine,nat,google-cloud-source-repos,google-cloud-router,Google Cloud Platform,Google Compute Engine,Nat,Google Cloud Source Repos,Google Cloud Router,我正在使用一个谷歌计算引擎实例,它禁用了外部IP地址,并且正在通过云NAT访问互联网。问题是,当我尝试使用SSH身份验证从Google云源Repo克隆Repo时,我遇到以下错误:- Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 我

我正在使用一个谷歌计算引擎实例,它禁用了外部IP地址,并且正在通过云NAT访问互联网。问题是,当我尝试使用SSH身份验证从Google云源Repo克隆Repo时,我遇到以下错误:-

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
我使用在GCE中设置云NAT。我安装了几个软件包,GCE就可以访问互联网了。我使用RSA密钥进行身份验证,并按照提供的说明进行操作


我怎样才能解决这个问题?我不想使用手动凭证或云SDK来克隆Repo。

这不是计算引擎或NAT问题(或网络),而是GIT问题。您的客户端未在存储库上获得授权

对于这一点,你可以相信这一点


我的猜测是,计算引擎服务帐户无权访问云存储库。在设置页面中检查云存储库权限(gear位于云存储库的右上角)。

该消息有些不言自明

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
您必须具有@guillaume提到的相应凭据,您必须没有您的公共SSH密钥,或者您的GCE实例中缺少私钥,或者您的git没有正确引用私钥


确认这一点的方法是为您当前的GCE实例提供一个实例,以绕过云NAT。

谢谢您的回答。但是我已经在使用SSH身份验证,正如我在上面的问题中所说的那样。但错误依然存在。