Closed de-ranit closed 8 months ago
Hello! Apologies for such a long delay. Can it be that you have special characters in your password? I have updated the README to explain what to do in this case: https://github.com/ICOS-Carbon-Portal/meta/commit/221aa6049bfde1cdc85fee9e64dcdfc079f94c05 Does this help?
Hi,
Thanks for your suggestion.
Indeed, I have special characters in my password. I tried using curl --cookie-jar cookies.txt --data-urlencode "mail=<email@email.com>&password=<password>" https://cpauth.icos-cp.eu/password/login
. But now I get Need to be logged in as admin, using username/password account
.
No, you should not use --data-urlencode
you should still use --data
, but url-encode the password before placing it into the data string. Please follow the updated instruction and get back. Also, may I suggest trying out a new Python library that helps with authentication: https://pypi.org/project/icoscp_core/
I tried the updated instructions. I have _
in my password and browser's encodeURIComponent()
gives _
for underscore encoding. So, the password remains the same after encoding and I get the Incorrect user name or password
. I also tried replacing _
with %5f
, but it also gives me the same error.
Thanks for the Python library. I will check it out.
Well, it does seem like you are using an incorrect user name or password. To properly verify this, you can perform the following steps.
If sign in works, then we can look further into the version of the curl and the operating system that you are using. If this does not work, then maybe you have not created a username/password account with Carbon Portal, were using alternative sign in methods instead (e.g. University sign in), and were trying to use the credentials of that method. To verify what login method you have used, you can visit https://cpauth.icos-cp.eu/home/, scroll down to the bottom of the page, and inspect the "API token" panel. For a local username/password sign-in, it should look like this (note "Source: Password"):
Yes, the normal sign-in through web browser works perfectly with the same credentials and the source is also password as shown in the screenshot.
I have tried getting the cookie file using curl
on two computers. curl -V
gives me the followings.
curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1k zlib/1.2.11 brotli/1.0.6 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.2.0) libssh/0.9.4/openssl/zlib nghttp2/1.33.0
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz brotli TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
and
curl 7.79.1 (x86_64-apple-darwin21.0) libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1
Release-Date: 2021-09-22
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets
I propose that we continue this investigation via direct email communication. Please find me here and write to me, preferably from the email address that you used to sign in. I can then reset your password to another value (which I disclose to you), and test your account directly. You will afterwards be able to change it back.
I am getting an incorrect username or password, every time I try to get the cookies. I also checked my credentials multiple times and they seem correct to me and I can also login to ICOS data portal in web browser.
$ curl --cookie-jar cookies.txt --data "mail=<user email>&password=<password>" https://cpauth.icos-cp.eu/password/login