n4ze3m / dialoqbase

Create chatbots with ease
https://dialoqbase.n4ze3m.com/
MIT License
1.54k stars 253 forks source link

Access token for github datasource #164

Closed phpia closed 7 months ago

phpia commented 7 months ago

Hi, Im trying to connect a datasource to a private github repo.

Should I use Fine-grained personal access token or Classical token?

Im not able to connect

Thanks!

n4ze3m commented 7 months ago

Hey,

Just put Fine-grained GitHub token into GITHUB_ACCESS_TOKEN, but make sure you have granted repo permissions to the generated token; otherwise, it won't work

Also, make sure to check the 'Is private' option on the Dialoqbase datasource form.

image

n4ze3m commented 7 months ago

Edit: I'm sorry. The fine-grained token is unable to clone the repository (perhaps it needs permission). I tested it with the classic one, which is working fine.

Dialoqbase directly clones the repository instead of using the API causing rate limits if you try with a larger repository

image

phpia commented 7 months ago

Hi Nazeem, I try with the classic one but the source show pending and if a change of screen appears "Bot is cooking... It may take some time"

Log shows: [App] Cloning into './uploads/xxxxx-main'... │./.git/logs/refs/remotes Username for 'https://github.com': [App] [info] use ffmpeg.wasm v0.12.0

thanks!

phpia commented 7 months ago

Mmm, in the log is asking for github user maybe not using the token ?

[]([App] Cloning into './uploads/XXXXX.git-main'... Username for 'https://github.com':)

n4ze3m commented 7 months ago

Hey, you have to set 'enable private repo' to true; otherwise, it won't use the token. In a future release, I will fix this issue

image

n4ze3m commented 7 months ago

small example cloning private by enabling 'private repo'

https://github.com/n4ze3m/dialoqbase/assets/39720973/fbcc3f15-0813-4f5e-aa59-a38dafc44227

phpia commented 7 months ago

Yes I got it. Its working

Thanks a lot for your help!!!

n4ze3m commented 7 months ago

Amazing! I'm closing this issue. Feel free to reopen it if you have any concerns :)