hcavarsan / kftray

🦀 ⚡ kubectl port forward manager, with support for UDP and proxy connections through k8s clusters
https://kftray.app/
GNU General Public License v3.0
860 stars 65 forks source link

Allow importing from GitHub repository without a personal access token #336

Open caoimhebyrne opened 2 weeks ago

caoimhebyrne commented 2 weeks ago

Is your feature request related to a problem? Please describe. The GitHub Sync feature currently requires a personal access token to be used on a GitHub account in order to pull the repository.

Describe the solution you'd like It would be better if it used the system git install, and cloned the repository through that instead, so we don't have to use a personal access token, as we may not be able to create them for certain repositories if our permissions don't allow it.

Describe alternatives you've considered Being able to auto-import from a static file would also be a good option.

Additional context N/A

hcavarsan commented 6 days ago

hey @caoimhebyrne! added this in v0.15.1, now its possible to use your system's git store credentials instead of requiring a github token.

CleanShot 2024-11-21 at 17 09 30

if you can git clone locally, should be work in the app... can you try to see if it works?

caoimhebyrne commented 5 days ago

Hi @hcavarsan thanks for implementing this :)

What needs to go in the "config path" field? I was using some values before but never really got it to work, what is supposed to be there?

image
hcavarsan commented 5 days ago

thx for the feedback! yeah, the change makes total sense - much better this way :)

about the path - it's where your kftray config json lives in the repo. Here's an example:

Path Example

URL: https://github.com/hcavarsan/kftray
Path: examples/configs.json

This syncs your settings using the configs.json from the kftray repo.

You can also validate the path in your terminal:

# set env variables
export REPO_URL=https://github.com/hcavarsan/kftray
export PATH=examples/configs.json

# clone repo and validate if configs.json exists
git clone $REPO_URL
cat $PATH

If the file exists, you'll see its contents and will work as expected in kftray.

also, to generate the config.json file with your configs:

CleanShot 2024-11-22 at 11 47 24

This will create the json file with all your configurations...