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

Plugin updates from private repository not working #42

Closed
surgeonsadvisor opened this issue Sep 23, 2015 · 2 comments
Closed

Plugin updates from private repository not working #42

surgeonsadvisor opened this issue Sep 23, 2015 · 2 comments

Comments

@surgeonsadvisor
Copy link

Hi!,
i follow the instructions and added the folder inside my plugin, i'm also calling the update file like this, but i doesn't work.

// Load the auto-update class
require 'plugin-update-checker/plugin-update-checker.php';
$className = PucFactory::getLatestClassVersion('PucGitHubChecker');
$myUpdateChecker = new $className(
'https://github.com/surgeonsadvisor/sa-photo-gallery',
FILE,
'master'
);
$myUpdateChecker->setAccessToken('######myaccesstoken######');

but i get this,
2015-09-23_11-18-54

Any help will be appreciated.

Best Regards.

@YahnisElsts
Copy link
Owner

Interesting. That might be an oversight on my part. Try changing lines 95 to 97 in github-update-checker.php from this:

if ( empty($info->download_url) ) {
    $info->download_url = $this->buildArchiveDownloadUrl($ref);
}

To this:

if ( empty($info->download_url) ) {
    $info->download_url = $this->buildArchiveDownloadUrl($ref);
} else if ( !empty($this->accessToken) ) {
    $info->download_url = add_query_arg('access_token', $this->accessToken, $info->download_url);
}

@surgeonsadvisor
Copy link
Author

Thank You! This work for me.
2015-09-23_13-03-27

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