Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get GitHub info #34

Open
tblobaum opened this issue Jun 29, 2023 · 2 comments
Open

Get GitHub info #34

tblobaum opened this issue Jun 29, 2023 · 2 comments

Comments

@tblobaum
Copy link

Is there a way to retrieve the github credentials in php? I am working on a news aggregator theme and it requires git-it-write so it would be better if I could just retrieve the github credentials programmatically instead of asking the user to enter them into a separate settings page.

@tblobaum
Copy link
Author

IMG_6491

@vaakash
Copy link
Owner

vaakash commented Jun 30, 2023

Hi @tblobaum,

AFAIK, the access token must be manually created by the user and that access token must be entered in the settings page.
Please do check Github REST API and documentation to see if any shortcut is possible.

Previously Git it write did not accept any username and access token and later to support private repositories this feature was added. As I remember username and access token are not needed for public repositories. The open access has some restrictions too. But you can give it a try without any username and access token and see if it works for you. You need to comment the below line for now.
https://plugins.trac.wordpress.org/browser/git-it-write/trunk/includes/repository.php#L35

Thanks,
Aakash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants