Comments (17)
Yeah, the sign test was a copy'n'paste error :( ... fixed that one and the missing imports. The sign test will make sure you don't have an issue with missing key. The api for gnupg doesn't seem to return a documented object, which is why I don't test the result, which is bad. I could (like you said) test that the call produced a new file, which is what I'll do.
from iceshelf.
Did you install the gnupg python module using with apt-get or with pip? Because apt-get will unfortunately get you an older version (even if it says 2.0.2) which lacks this function. (see https://pythonhosted.org/python-gnupg/#encryption )
from iceshelf.
I (thought I) used pip as you said in the README. How can I reinstall it?
from iceshelf.
Hmm... you're also running on jessie, let me do a clean install tonight on jessie and see if anything has changed since I last set it up. It's a bit unfortunate that there are various versions of the gnupg which differ so much :(
Sorry, I'll update tomorrow once I've tested it.
If you want to uninstall the gnupg version, try "sudo pip uninstall gnupg" ... maybe you got both the apt version and the pip and the pip version was overwritten by apt's version? (speculating)
from iceshelf.
Hi,
thanks for your quick response! In pip I installed python-gnupg and uninstalled gnupg. Now encrypting did work =)
Perhaps this is something for a trubleshooting section?
from iceshelf.
Now I got another error and it seems to be related as it works without encryption
Encrypting archive
Signing archive
Traceback (most recent call last):
File "build/iceshelf/iceshelf", line 426, in <module>
files = gatherData()
File "build/iceshelf/iceshelf", line 229, in gatherData
with open(file_archive, 'rb') as fp:
IOError: [Errno 2] No such file or directory: '/raid/Temp/iceshelf/20160311-231300-be819.tar.bz2.gpg'
The temp dir only contains a JSON file, nothing ekse
from iceshelf.
Thanks for finding this one, my testsuite was not using encryption (to save time) so I completely missed that if the archive generator doesn't find any changes to save, it will start failing with encryption enabled. This is of course not OK, so now it runs two times, with or without encryption and soon also with or without signature.
I've also updated the README.md with CORRECT instructions (sorry, it was pip install python-gnupg not pip install gnupg, why there are two versions with the same python name, I don't know). Also added to the faq so people making this mistake have some insight into how to fix it.
Please pull latest and let me know if you still have issues.
from iceshelf.
I still had the same error (file not found). Then I found this note for encrypt_file:
Any public key provided for encryption should be trusted, otherwise encryption fails but without any warning.
Trusting the key solved this error. So I suggest you check after encrypting whether the file exists and raise an error with the trust as possible cause.
Now I'm at the next step :) I've got PAR enabled and get this error:
Encrypting archive
Signing archive
Output:
Error : You must specify a list of files when creating.
Code : 3
Unable to create PAR2 file for this archive
Failed to gather all data and compress it.
from iceshelf.
I really apologize for all the issues you're running in to and I appreciate the patience. All too easy to miss things when you have a running setup. I think the PAR error is the same issue as the encrypt. I'll check that in about 20min. As for the key, yes, you're right, I need to deal with non-existing keys properly (what? doesn't everyone have it running before running it?? ;))
from iceshelf.
I've added a bit more debugging to this, including the filename leading up to it. Would you mind pull:ing again and running it?
from iceshelf.
Just out of curiousity, how are you providing the key to the encryption/signing settings? I've been using the email and the gpg vault of the linux account and after creating the pair with gpg --gen-key
I never had the trust issue you mention, so I just want to understand when this happens :)
from iceshelf.
This is absolutely no problem :) I don't want to complain about errors, I want to assist you in finding them ;) After all this is issue #1!
I created my keypair on my desktop and imported only the public key on the backup machine. I had the same trust issues with gpgit
for mails, so I should have thought about this :D
I'll try again in a few hours, thank you very much!
from iceshelf.
Again it was my fault. As I said I only imported the public key, not the private key on the backup machine. So gpg --sign
failed:
$:~/build/iceshelf$ gpg -u [email protected] --sign
gpg: skipped "[email protected]": secret key not available
gpg: signing failed: secret key not available
$:~/build/iceshelf$ echo $?
2
This exit/error code should be tested after signing. Now it's working 👍 Thank you!
from iceshelf.
My next problem (I had to fix my Glacier permissions first) :) I will append it here even if it isn't related:
Creating vault "Music-Backup"
Vault created
Uploading 6 files (62K) to glacier, this may take a while
Traceback (most recent call last):
File "/home/osmc/build/iceshelf/iceshelf", line 478, in <module>
backup = glacier.uploadFiles(config, files, totalbytes)
File "/home/osmc/build/iceshelf/glacier.py", line 19, in uploadFiles
cmd.append(os.path.join(config["prepdir"], f))
NameError: global name 'os' is not defined
from iceshelf.
Solution: Import os.path and time in glacier.py
import os.path
import time
from iceshelf.
I now test the keys provided as well as do better handling of gnupg vs pythin-gnupg (it actually is supposed to detect the wrong module now, yay!). Are you ok with closing this issue?
from iceshelf.
Yep, that's fine :)
from iceshelf.
Related Issues (8)
- UTF-8 filenames HOT 16
- How to run the tool itself? HOT 3
- Done dir cannot be empty HOT 2
- Use file name as archive description HOT 27
- Use AWS client instead of glacier-cmd HOT 8
- JSON file will become too big HOT 2
- stable release? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iceshelf.