5

Can't connect for 3 days already, saing 'Failed to connect repositories'

All access already granted and i'm repository owner

Perhaps you know how to deal with that

EDIT: Bitbucked connected without any problem

Thanks in advanced

enter image description here

G.F.
  • 151
  • 4

3 Answers3

3

Enabling the sourcerepo.googleapis.com API on the project solved it.

ThdK
  • 123
  • 1
  • 7
Stipe
  • 31
  • 1
2

Looks like Google's service is buggy at the moment. When you attempt to connect it does a POST. I am having same issue.

On my end it attempts to post:

Request URL:

https://grimoire-pa.clients6.google.com/batch%24ct=multipart%2Fmixed%3B%20boundary%3Dbatch764066031442833345

Request Method: POST Status Code: 200 Remote Address: 172.217.15.202:443

The response is a 503 error:

Content-Type: application/http
Content-ID: <response-batch764066031442833345+gapiRequest@googleapis.com>

HTTP/1.1 503 Service Unavailable
Vary: Origin
Vary: X-Origin
Vary: Referer
Content-Type: application/json; charset=UTF-8

{
  "error": {
    "code": 503,
    "message": "The service is currently unavailable.",
    "status": "UNAVAILABLE"
  }
}

--batch_C_zVap1Dhuz5adk2myfN4OrLwJOruXCd--
IMDB
  • 21
  • 1
  • Thanks for response. Yes, its looks like a bug. Bitbucket connected without any problem, just checked – G.F. May 09 '19 at 18:01
1

Based on your screenshot it looks like you were trying to connect to an organization repository. I was having the same problem with organization repositories but I managed to find a workaround (though, I am not sure how reliable it is so it is not guaranteed to work):

  1. Go to your Github application settings (https://github.com/settings/applications)
  2. Revoke access from Google Cloud Platform
  3. Add a new repository to Cloud Source Repositories with "connect external repository" (https://source.cloud.google.com/repo/new)
  4. Select a project
  5. Select Github as a provider
  6. Now it still has your Github account selected but GCP has no access to your repositories. Click "connect a different account" (but still use the same account)
  7. Grant access to your repositories (and the organization repositories)
  8. Select an organization repository and "connect selected repository"
  9. GCP should now be able to mirror the repository
vkopio
  • 119
  • 5
  • This is what did it for me, thanks. I think the key part is to grant access to the organization itself when you authorize GCP again. – 1000Nettles May 16 '22 at 16:33