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

Running bash /protonmail/entrypoint.sh init does not work with 1.6.3-1 on kubernetes #25

Open
Eagleman7 opened this issue Feb 24, 2021 · 3 comments

Comments

@Eagleman7
Copy link

I'v had to remove my persistent storage a while ago. However with brand new storage with version 1.6.3-1 I cannot seem to get to the login option.

Once I am inside the pod/container and run this command:
bash /protonmail/entrypoint.sh init

This happens:

root@protonmail-bridge-7bf6f88599-tcmzq:/protonmail#  bash /protonmail/entrypoint.sh init
+ [[ init == init ]]
+ gpg --generate-key --batch /protonmail/gpgparams
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: Generating a basic OpenPGP key
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 3C8BADCA153A6FE2 marked as ultimately trusted
gpg: directory '/root/.gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/root/.gnupg/openpgp-revocs.d/D840F8CA6EBEA3A7E09402FD3C8BADCA153A6FE2.rev'
gpg: done
+ pass init pass-key
mkdir: created directory '/root/.password-store/'
Password store initialized for pass-key
+ protonmail-bridge --cli
root@protonmail-bridge-7bf6f88599-tcmzq:/protonmail# 
@shenxn
Copy link
Owner

shenxn commented Feb 25, 2021

Try running protonmail-bridge --cli directly.

@shenxn
Copy link
Owner

shenxn commented Feb 25, 2021

I found the problem. In earlier versions (I've tested 1.5.4-1), starting the container without initializing pass will cause the bridge failed to start. Therefore, you can then get a bash environment, do the initialization, and start a bridge to set up. However, in more recent versions, the bridge does not check at boot so there will be a bridge running and thus you cannot start another one. I have almost zero experience in kubernetes but I think you need to somehow change the entrypoint during initialization and setup. You can also add account use an older version and then update.

@Lerrrtaste
Copy link

I had this exact same error. You should never call protonmail-bridge --cli by itself, it relies on the socat port mappings to pretend the connection is coming from 127.0.0.1 and the fake terminal, which are created in entrypoint.sh before executing protonmail-bridge.

The solution:
(On a new container)

  • Call ./entrypoint.sh init (make it executable before with chmod +x entrypoint.sh)

  • Go in top and look up the process id's of the two protonmail processes.
    image
    (Here 11 and 17)

  • Kill them. (In my case kill 11 17)

  • Execute ./entrypoint.sh (without init).

  • Now you can use the protonmail-bridge CLI like normal. For example to login and info to get your password.

  • Restart the container just to make sure it works every time now.

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

3 participants