Git Download Updater – Setup Documentation
The Git Download Updater extension supports both GitHub and BitBucket.
Connecting to BitBucket
To create an app password follow the steps below:
- From your profile and settings avatar, select Personal settings.
- Select App passwords under Access management.
- Select Create app password.
- Give the app password a name that will help you remember what it’s used for.
- In the Permissions section check the boxes for Account > Read and Repositories > Read then click Create.
- Copy the generated password in a safe place for now. The password is only displayed this one time.
More details on app passwords (including usage and revocation) can be found in Bitbucket documentation.
Once you have the new app password add the two definitions below to your wp-config.php file and replace Username with your Bitbucket username and APP Password with the password you obtained from the steps above.
To find you Bitbucket username (do not confuse this with the account email) go to this page https://bitbucket.org/account/settings/ and the Username will be displayed under the “Bitbucket profile settings” section.
define( 'EDD_GIT_BB_USER', 'Username' ); define( 'EDD_GIT_BB_PASSWORD', 'password' );
Connecting to GitHub
Configuring a Download with Git Updater
Setting Your Download Files
1. The “Download Files” metabox on the download edit screen will now have a checkbox labeled “Fetch download from a git repository.” Check this box.
2. After a moment or two, a new set of fields will show up that will allow you to select a repository.
visit this guide.
Note: As of version 1.2, if you have readme.txt parsing enabled, the plugin will automatically copy the readme file (if it exists) from your repository and use it for parsing.
FAQs & Troubleshooting
How do I exclude or remove files before the zip is generated?
The Git Download Updater uses the ‘export’ feature of Git to build out the file to deliver. You can use the `.gitattributes` file to determine what files you want to ignore during the export. Here is an example of how we use it for EDD Core.
For more details on using git attributes to exclude files, see this tutorial.
Update conflict between free and paid version
There are two different ways to resolve this issue:
- Change the name and/or slug of the pro version. Because of a nuance with the WordPress update API, WordPress cannot actually distinguish them as separate plugins.
- Add “wp_override” to the third parameter of the EDD_SL_PLugin_Updater class when it is instantiated, like this:
// set up the updater $edd_updater = new EDD_SL_Plugin_Updater( EDD_SAMPLE_STORE_URL, __FILE__, array( 'version' => '1.0', // current version number 'license' => $license_key, // license key (used get_option above to retrieve from DB) 'item_name' => EDD_SAMPLE_ITEM_NAME, // name of this plugin 'author' => 'Pippin Williamson', // author of this plugin, 'wp_override' => true ) );