如何更新我的 google 云存储库? (面临ssh问题)

How to update my google cloud repository ? (facing ssh problems)

我现在面临一个问题,无论我是尝试 git 拉取、推送还是只是克隆我的 google 云控制台存储库,我都会收到此错误:

ssh: connect to host source.developers.google.com port 2022: Undefined error: 0
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

我有权限访问,因为我是存储库的所有者。此外,我生成了一个新的 SSH 密钥并将其添加到存储库的“管理 SSH 密钥”space。我已经尝试了几种 SSH 密钥类型,仍然没有成功。 我不明白,因为我过去常常毫无问题地更新它,而且我不记得在它发生之前更改了我的 SSH 密钥。

  1. 您是否注册了 public 密钥
    https://cloud.google.com/sourcerepositories/docs/authentication#register_a_public_key

  2. 确保您对 .ssh 文件夹和密钥具有正确的权限

The .ssh directory permissions should be 700 (drwx------).  
The public key (.pub file) should be 644 (-rw-r--r--). 
The private key (id_rsa) on the client host.
The authorized_keys file on the server, should be 600 (-rw-------).
  1. 要调试,请尝试使用 ssh 连接到您的存储库,例如 ssh -vT myuser@source.developers.google.com

  2. 查找 .ssh/config 是否存在且配置错误或配置如下

host source.developers.google.com
HostName source.developers.google.com
Port 2022
IdentityFile ~/.ssh/my_private_key
User myuser