All Projects → OutsourcedGuru → OctoPrint-GitFiles

OutsourcedGuru / OctoPrint-GitFiles

Licence: other
With this plugin, you can use a github/gitlab repository for keeping your OctoPrint Files collection up-to-date.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to OctoPrint-GitFiles

OctoPrint-AstroPrint
Connect your OctoPrint device to the AstroPrint 3D Printing Cloud
Stars: ✭ 26 (-7.14%)
Mutual labels:  octoprint, 3d-printing, octoprint-plugin
OctoPrint-Smuff
OctoPrint Plugin for SMuFF
Stars: ✭ 17 (-39.29%)
Mutual labels:  octoprint, 3d-printing, octoprint-plugin
octoscreen
A touchscreen client for Octoprint
Stars: ✭ 26 (-7.14%)
Mutual labels:  octoprint, 3d-printing, 3d-printer
OctoPrint-Webhooks
Make OctoPrint events call your custom webhooks!
Stars: ✭ 27 (-3.57%)
Mutual labels:  octoprint, 3d-printing
10-days-of-git-and-github
asabeneh.github.io/10-days-of-git-and-github/
Stars: ✭ 786 (+2707.14%)
Mutual labels:  gitlab, version-control
OctoPrint-Marlin-Flasher
Arduino/Marlin firmware flasher for OctoPrint
Stars: ✭ 36 (+28.57%)
Mutual labels:  octoprint, octoprint-plugin
OctoPrint-TasmotaMQTT
No description or website provided.
Stars: ✭ 17 (-39.29%)
Mutual labels:  octoprint, octoprint-plugin
OctoPrint-CameraSettings
An OctoPrint plugin that allows a user to interactively change camera settings.
Stars: ✭ 31 (+10.71%)
Mutual labels:  octoprint, octoprint-plugin
OctoPrint-CuraEngineLegacy
Plugin for slicing via Cura Legacy from within OctoPrint
Stars: ✭ 16 (-42.86%)
Mutual labels:  octoprint, octoprint-plugin
Octoprint
OctoPrint is the snappy web interface for your 3D printer!
Stars: ✭ 6,267 (+22282.14%)
Mutual labels:  octoprint, 3d-printer
Octoprint-Cancelobject
No description or website provided.
Stars: ✭ 90 (+221.43%)
Mutual labels:  octoprint, octoprint-plugin
Gitcommands
Here is a list of some basic Git commands to get you going with Git
Stars: ✭ 11 (-60.71%)
Mutual labels:  gitlab, version-control
OctoPrint-AutomaticShutdown
Plugin for automatically shutting down the system after print is finished
Stars: ✭ 18 (-35.71%)
Mutual labels:  octoprint, octoprint-plugin
pyr0piezo
An AVR/ARM based piezoelectric sensor for use in ultra-precise applications
Stars: ✭ 61 (+117.86%)
Mutual labels:  3d-printing, 3d-printer
octoprint-cli
Command line tool for controlling your OctoPrint 3D printer server
Stars: ✭ 25 (-10.71%)
Mutual labels:  octoprint, 3d-printing
threedy
Home Assistant card for 3D printer status and management.
Stars: ✭ 159 (+467.86%)
Mutual labels:  octoprint, 3d-printing
OctoPrint-MultiColors
Inject GCODE at specified layers to allow multi color printing via filament change
Stars: ✭ 20 (-28.57%)
Mutual labels:  octoprint, 3d-printing
OctoPrint-SimpleEmergencyStop
A simple plugin that add an emergency stop buton on NavBar of OctoPrint
Stars: ✭ 17 (-39.29%)
Mutual labels:  octoprint, octoprint-plugin
OctoPrint-Tasmota
No description or website provided.
Stars: ✭ 52 (+85.71%)
Mutual labels:  octoprint, octoprint-plugin
OctoPrint-GcodeEditor
Edit gcode on OctoPrint
Stars: ✭ 20 (-28.57%)
Mutual labels:  octoprint, octoprint-plugin

OctoPrint-GitFiles

With this plugin, you can use a github/gitlab repository for keeping your OctoPrint Files collection up-to-date. Publish your sliced files from a local repository on your workstation, then select to pull the latest from this remote repository.

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/OutsourcedGuru/OctoPrint-GitFiles/archive/master.zip

To prepare for this, you'll need a public github/GitLab repository which stores a master branch of your latest sliced files. You'll need its URL to put this in the Settings area of the plugin.

It's important not to use spaces in your GCODE filenames since OctoPrint will normally rename them in place (using underscores). This will likely cause problems which can easily be avoided if you not use spaces.

Configuration

When you first install the plugin, it will be necessary to add your repository's URL into the Settings interface.

github repository creation

settings

button

Possible complications

If you use this plugin and you also use OctoPrint's interface to upload files, you must be careful not to upload files into the gitfiles or other indicated subfolder. This would cause merge problems when you next pull from your repository.

Upon upload, OctoPrint will rename files, replacing spaces with underscores. If you've included space characters in your GCODE files they will be renamed-in-place which will then cause problems during the next pull. (Don't use spaces in your repository's filenames.)

Failure to edit settings -> URL

If you don't adjust the Settings -> GitFiles -> URL from the default, you should see something like this in the octoprint.log file:

2018-09-20 11:52:39,136 - octoprint.plugins.gitfiles - INFO - Problem with setup. Please visit Settings -> GitFiles and adjust the URL

Successful initialization

If everything worked, you should see something like this in the octoprint.log file:

octoprint.plugins.gitfiles - INFO - Path: `/home/pi/.octoprint/uploads/gitfiles`
octoprint.plugins.gitfiles - INFO - Testing the indicated `/home/pi/.octoprint/uploads/gitfiles` folder...
octoprint.plugins.gitfiles - INFO - Indicated folder is not initialized yet
octoprint.plugins.gitfiles - INFO - Creating the new `/home/pi/.octoprint/uploads/gitfiles` subfolder...
octoprint.plugins.gitfiles - INFO - Created
octoprint.plugins.gitfiles - INFO - Initializing...
Initialized empty Git repository in /home/pi/.octoprint/uploads/gitfiles/.git/
octoprint.plugins.gitfiles - INFO - 0
octoprint.plugins.gitfiles - INFO - Setting up the remote origin for master...
octoprint.plugins.gitfiles - INFO - 0
octoprint.plugins.gitfiles - INFO - -- git pull origin master ---------------------------------------------------
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 17 (delta 2), reused 13 (delta 0), pack-reused 0
Unpacking objects: 100% (17/17), done.
From https://github.com/OutsourcedGuru/3d-files
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
octoprint.plugins.gitfiles - INFO - git returned: 0
octoprint.plugins.gitfiles - INFO - -- (end of git pull) --------------------------------------------------------

Setup for private Github repository

Although I've not tested it directly with this plugin, there's a way of sending in your github/GitLab credentials as part of the URL in the plugin's Settings page.

https://YourGitHubID:[email protected]/YourGitHubID/3d-files.git

Prepend the hostname github.com, for example, with YourUserID:YourPassword@ ensuring that your password doesn't itself contain either of the special symbols shown.

You can also use privately-hosted GitLab instances by replacing github.com with the hostname of your privately-hosted instance.

If you don't like the idea of your credentials being copied to OctoPrint's config.yaml then set it up normally in the Settings page. Next, it should be possible to then manually edit the ~/.octoprint/uploads/gitfiles/.git/config or similar file under the [remote origin] section, adding the credentials as described above. In this way, your credentials will appear in the config file under a hidden .git directory rather than within OctoPrint's own configuration file.

Setup using an SSH key for authentication

If you don't want to pass your credentials in your URL or to save them in your git config, you can use an SSH keypair for authenticating to your remote repository.

This requires that you generate an SSH keypair on your Raspberry Pi. You'll want to remote into your Raspberry first with ssh and then issue the following command (after the $ sign below), accepting the defaults by pressing Enter each time:

pi@octopi:~ $ ssh-keygen -t rsa -C "pi@octopi"

Generating public/private rsa key pair.
Enter file in which to save the key (/home/pi/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/pi/.ssh/id_rsa.
Your public key has been saved in /home/pi/.ssh/id_rsa.pub.

Using the default settings should create the keys as ~/.ssh/id_rsa (private key) and ~/.ssh/id_rsa.pub (public key). You need to open id_rsa.pub in a text editor and copy its contents. MAKE SURE YOU OPEN/COPY THE .PUB VERSION.

In your github/GitLab account, go into your profile settings and open the section for SSH keys. Click New SSH Key and paste in the contents of the public key you copied in the previous step. This will allow you to authenticate using an SSH key yet not store your credentials anywhere.

keys section

new ssh key button

Once saved, you'll need to test this first on the Raspberry to accept the key. Adjust the URL for SSH authentication, changing the protocol. Instead of beginning with https://host/, you start the URL with git@host:github.com: and finishing with your case-sensitive ID and repository.

Example:

[email protected]:YourUserID/repo.git

So on the Raspberry, you'll want to do something like this to just test and accept the SSH key, (entering the commands after each $ sign):

pi@octopi:~ $ mkdir ~/tmp && cd ~/tmp
pi@octopi:~ $ git clone [email protected]:YourUserID/repo.git
Cloning into 'repo'...
The authenticity of host 'XXXX (X.X.X.X)' can't be established.
ECDSA key fingerprint is SHA256:1Pe176kN32iqaypIpAfQIwmEiUDFhwX3q/gI9J2+lPw.
Are you sure you want to continue connecting (yes/no)? yes

You must type yes to accept the key and to store it, so that later the plugin will be able to pull from your repository in the future.

After this is completed, you can simply configure the correct git@ URL in the plugin settings and you're ready to use SSH authentication.

Now that you've initially tested your keypair and you no longer need that temporary folder, you can remove it with (entering the commands after the $ sign):

pi@octopi:~ $ cd ~ && rm -rF tmp

Description Version Author Last Update
OctoPrint-GitFiles v1.1.5 OutsourcedGuru November 27, 2018
Who Role
OutsourcedGuru Author
scottrini Contributor - Docs & recent work with direct uploads functionality
Donate Cryptocurrency
eth-receive btc-receive
Ethereum Bitcoin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].