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

Save options locally with or without trailing slash #735

Closed
heuzef opened this issue Sep 30, 2022 · 9 comments
Closed

Save options locally with or without trailing slash #735

heuzef opened this issue Sep 30, 2022 · 9 comments
Labels

Comments

@heuzef
Copy link

heuzef commented Sep 30, 2022

Hi :)
I just want to save my profils localy but it's not really simple :(

I found this solution :

/root/.local/bin/lesspass --save --url https://192.168.100.102

But obviously this is a problem for the number of authorized requests :

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connection.py", line 408, in connect
    ssl_context=context,
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib64/python3.6/ssl.py", line 365, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib64/python3.6/ssl.py", line 776, in __init__
    self.do_handshake()
  File "/usr/lib64/python3.6/ssl.py", line 1036, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib64/python3.6/ssl.py", line 648, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:877)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 438, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.100.102auth', port=443): Max retries exceeded with url: /jwt/create/ (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:877)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.local/bin/lesspass", line 11, in <module>
    sys.exit(main())
  File "/root/.local/lib/python3.6/site-packages/lesspass/core.py", line 29, in main
    return save_password_profiles(args.config_home_path, args.url, args.save_path)
  File "/root/.local/lib/python3.6/site-packages/lesspass/connected.py", line 62, in save_password_profiles
    token = _login(config_home_path, url)
  File "/root/.local/lib/python3.6/site-packages/lesspass/connected.py", line 49, in _login
    json={"email": email, "password": encrypted_password},
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 651, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 502, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.100.102auth', port=443): Max retries exceeded with url: /jwt/create/ (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:877)'),))

Any idea ?

@guillaumevincent
Copy link
Member

is your cert expired ?
It's a TLS issue.

What curl --head https://192.168.100.102 returns ?

@heuzef
Copy link
Author

heuzef commented Oct 5, 2022

I found why, i just need to try with domaine name, but i have still an error :

Traceback (most recent call last): File "/home/heuzef/.local/bin/lesspass", line 8, in <module> sys.exit(main()) File "/home/heuzef/.local/lib/python3.9/site-packages/lesspass/core.py", line 29, in main return save_password_profiles(args.config_home_path, args.url, args.save_path) File "/home/heuzef/.local/lib/python3.9/site-packages/lesspass/connected.py", line 62, in save_password_profiles token = _login(config_home_path, url) File "/home/heuzef/.local/lib/python3.9/site-packages/lesspass/connected.py", line 47, in _login r = requests.post( File "/usr/lib/python3.9/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.

ConnectionError: HTTPSConnectionPool(host='password.heuzef.comauth', port=443): Max retries exceeded with url: /jwt/create/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3322a51130>: Failed to establish a new connection: [Errno -2] Name or service not known'))

I use Caddy as reverse-proxy.

@guillaumevincent
Copy link
Member

curl --head https://password.heuzef.comauth ?

@guillaumevincent
Copy link
Member

Oh no you are missing a trailing slash no ?

lesspass --save --url https://password.heuzef.com/

It's a bug we need to fix, it should work with and without trailing slash

@heuzef
Copy link
Author

heuzef commented Oct 7, 2022

Oh no you are missing a trailing slash no ?

lesspass --save --url https://password.heuzef.com/

It's a bug we need to fix, it should work with and without trailing slash

Nop, i've aleready try with https://password.heuzef.com/ and https://password.heuzef.com/api
but the credential are not accepted.
Working only with lesspass --save --url https://password.heuzef.com without trailing slash.

@heuzef
Copy link
Author

heuzef commented Oct 7, 2022

You can create an account on my instance for test the export ? Maybe it can help for debug ?

@guillaumevincent
Copy link
Member

Working only with lesspass --save --url https://password.heuzef.com without trailing slash.

If it's working only for lesspass --save --url https://password.heuzef.com no thank you, I have only what I need.

@guillaumevincent guillaumevincent changed the title Save profils localy Save options locally with or without trailing slash Oct 10, 2022
@heuzef
Copy link
Author

heuzef commented Nov 6, 2022

Any news ?

@guillaumevincent
Copy link
Member

Hello,

it should be fixed in version 10.1.1

trinityzhub pushed a commit to trinityzhub/lesspass that referenced this issue Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants