itsjeffro / deploy

Laravel package for zero-downtime deployments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to connect Bitbucket (Private repo)

paulycloud opened this issue · comments

Hey @itsjeffro
One other issue i'm running into, i'm unable to connect my bitbucket account to my integrations.

O-Auth is configured with all the permissions. When i get to the grant page, i click allow but after it redirect me back to my call back URL, i still don't see the connection.

Can you help?
Thanks,

Hi @paulycloud

Its been a while since i updated the integration for bitbucket since i mainly use github now. After testing, it seems that the access token thats suppose to be stored in the ID column of the table deploy_access_tokens is too long.

so it's probably not storing the accessing token which is required to access private repos.

could you confirm that a token is being saved in the table deploy_access_tokens when you click "connect to bitbucket" on the page /deploy/account ?

Hey @itsjeffro ,

I checked both the deploy_refresh_tokens and deploy_access_tokens and nothing is being stored in that table.

@paulycloud

Ah ok, its most likely the 100 char limit then. Ive released v1.1.0 last night which includes a new migration file.

Update your version from 1.0.6 to 1.1.0. Run php artisan migrate. This will change the 100 char limit to 255 for access tokens to be stored properly.

Hey @itsjeffro
Still unable to get the bitbucket integration even after updating. Both tables are empty:

access_token_table
image

refresh_token_table
image

Has it successfully worked on your side?
Thanks!!!

Yep, I had it working last night before pushing the latest release out :)

Just for the sake of it. Have you done the following:

  1. Register a new oauth app in bitbucket with the callback to yoursite.com/deploy/authorize/bitbucket/access. Permissions should be projects:read, account:read, webhooks:read and write
  2. Copy the id and secret to your .env file
  3. Go to /deploy/account
  4. Click "connect to bitbucket"

@paulycloud

Sorry, updated the steps in my previous comment. It looks like i forgot to mention in the readme that the user needs to add yoursite.com/deploy/authorize/bitbucket/access to their oauth app's callback. As well as the permissions.

So i'm assuming that's the issue. Let me know if that works. If it does then I'll update the README

Hey @itsjeffro

That worked!! i can successfully add the bitbucket repo after modifying the call back URL.

Thank you.