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

Encryptation DON'T WORK. TRAVIS CI ERROR #547

Open
eamanu opened this issue Jun 10, 2017 · 7 comments
Open

Encryptation DON'T WORK. TRAVIS CI ERROR #547

eamanu opened this issue Jun 10, 2017 · 7 comments

Comments

@eamanu
Copy link
Contributor

eamanu commented Jun 10, 2017

I have problems with permissions (I think).. whatever I give up

ERROR: cron (unittest.loader._FailedTest)

ImportError: Failed to import test module: cron
Traceback (most recent call last):
File "/home/travis/build/chaosbot/Chaos/encryption.py", line 8, in create_decryptor
with open(private_location, "rb") as key_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/privkey'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/python/3.6.1/lib/python3.6/unittest/loader.py", line 462, in _find_test_path
package = self._get_module_from_name(name)
File "/opt/python/3.6.1/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/travis/build/chaosbot/Chaos/cron/init.py", line 4, in
from .poll_pull_requests import poll_pull_requests as poll_pull_requests
File "/home/travis/build/chaosbot/Chaos/cron/poll_pull_requests.py", line 12, in
from twitter_api import Twitter as tw
File "/home/travis/build/chaosbot/Chaos/twitter_api/init.py", line 1, in
from . import misc
File "/home/travis/build/chaosbot/Chaos/twitter_api/misc.py", line 1, in
from encryption import decrypt
File "/home/travis/build/chaosbot/Chaos/encryption.py", line 48, in
decrypt = create_decryptor("/etc/privkey", "server/pubkey.txt")
File "/home/travis/build/chaosbot/Chaos/encryption.py", line 15, in create_decryptor
with open(private_location, "wb") as key_file:
PermissionError: [Errno 13] Permission denied: '/etc/privkey'

ERROR: twitter_api (unittest.loader._FailedTest)

ImportError: Failed to import test module: twitter_api
Traceback (most recent call last):
File "/home/travis/build/chaosbot/Chaos/encryption.py", line 8, in create_decryptor
with open(private_location, "rb") as key_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/privkey'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/python/3.6.1/lib/python3.6/unittest/loader.py", line 462, in _find_test_path
package = self._get_module_from_name(name)
File "/opt/python/3.6.1/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/travis/build/chaosbot/Chaos/twitter_api/init.py", line 1, in
from . import misc
File "/home/travis/build/chaosbot/Chaos/twitter_api/misc.py", line 1, in
from encryption import decrypt
File "/home/travis/build/chaosbot/Chaos/encryption.py", line 48, in
decrypt = create_decryptor("/etc/privkey", "server/pubkey.txt")
File "/home/travis/build/chaosbot/Chaos/encryption.py", line 15, in create_decryptor
with open(private_location, "wb") as key_file:
PermissionError: [Errno 13] Permission denied: '/etc/privkey'

@rudehn
Copy link
Contributor

rudehn commented Jun 10, 2017

try sudo

@PlasmaPower
Copy link
Contributor

@rudehn sudo is disabled by default on Travis builds. We could enable it, but that'd probably be a bad idea (longer build times).

@PlasmaPower
Copy link
Contributor

We should probably just disable the encryption module on Travis, as the key there won't be the same anyway.

@eamanu
Copy link
Contributor Author

eamanu commented Jun 10, 2017

Yeah encryptation doesn't work ... And well if we use private tokens, we have to trust in us

@PlasmaPower
Copy link
Contributor

Encryption does work, just not on Travis. Yes, we have to place trust in the author of the PR, but we can always change the key to someone else's if something happens.

@dbpokorny
Copy link

@PlasmaPower huh? I thought the bot made its own private key and kept it private. Encryption works on Travis, you just have to write code that tests the process of creating a private key.

@PlasmaPower
Copy link
Contributor

What I mean by "doesn't work" is that the private key will be different, so decryption will fail.

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

4 participants