You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue where the library step cloudFoundryDeploy fails if the password contains special characters. Below is a snippet of the relevant log with some data redacted
info cloudFoundryDeploy - running command: cf version
info cloudFoundryDeploy - cf version 8.7.10+5b7ce3c.2024-04-04
info cloudFoundryDeploy - Logging in to Cloud Foundry
info cloudFoundryDeploy - Logging into Cloud Foundry..
info cloudFoundryDeploy - running command: cf login -a https://api.cf.us10-001.hana.ondemand.com/ -o redacted -s dev -u **** -p ****
info cloudFoundryDeploy - API endpoint: https://api.cf.us10-001.hana.ondemand.com/
info cloudFoundryDeploy -
info cloudFoundryDeploy -
info cloudFoundryDeploy - Authenticating...
info cloudFoundryDeploy -
info cloudFoundryDeploy - Error Code: 401
info cloudFoundryDeploy - Password: API endpoint: https://api.cf.us10-001.hana.ondemand.com/
info cloudFoundryDeploy - API version: 3.167.0
info cloudFoundryDeploy - Raw Response: {"error":"invalid_client","error_description":"{\"error\":\"invalid_grant\",\"error_description\":\"User authentication failed: Unauthorized\"}"}
info cloudFoundryDeploy - Not logged in. Use 'cf login' or 'cf login --sso' to log in.
info cloudFoundryDeploy - Unable to authenticate.
info cloudFoundryDeploy - FAILED
In fact, I checked how cf CLI would behave if I omit quoting my password in my local desktop and the logs are the same. Locally, quoting my password was enough to get things working. Moreover, when I changed my password to remove all special characters, this error didn't happen in Jenkins and the login was successful.
As you can see, the password will be appended to -p verbatim. Thus is the password is abc$123, the appended string will become -p abc$123 which will be an issue in both linux and windows shells. Same is also true if the username contains a special character.
Hello
I am encountering an issue where the library step
cloudFoundryDeploy
fails if the password contains special characters. Below is a snippet of the relevant log with some data redactedIn fact, I checked how cf CLI would behave if I omit quoting my password in my local desktop and the logs are the same. Locally, quoting my password was enough to get things working. Moreover, when I changed my password to remove all special characters, this error didn't happen in Jenkins and the login was successful.
Related to #32.
The text was updated successfully, but these errors were encountered: