Commit e007f512 authored by Alexandre Boyer's avatar Alexandre Boyer
Browse files

get-system git: cleans username and password fields to replace @

parent a2193647
Pipeline #133957 passed with stage
in 28 seconds
......@@ -9,10 +9,11 @@ cli=$6
name=$7
# If there are credentials
# Replace '@' by its hexa character to clean the password to avoid confusion with the '@' delimiter
# Replace '@' by its hexa character to clean the fields to avoid confusion with the '@' delimiter
if [ $user != "None" ] && [ $password != "None" ]; then
cleaned_user=`echo $user | sed 's/@/%40/g'`
cleaned_password=`echo $password | sed 's/@/%40/g'`
credentials="${user}:${cleaned_password}@"
credentials="${cleaned_user}:${cleaned_password}@"
else
if [ $token != "None" ];then
credentials="oauth2:${token}@"
......
......@@ -20,6 +20,7 @@ Clones a git repository
| user | U | False | username to access the url |
| password | p | False | password to access the url |
| token | t | False | token to access the url |
| name | n | False | name to give to the system |
### Usage
......@@ -47,6 +48,12 @@ Store the system in a specific directory:
actev get-system git -u <git repository url> ... -l <location>
```
Store the system in a specific directory:
```
actev get-system git -u <git repository url> ... -l <location> -n <directory name>
```
:information_source: You can also directly add your credentials inside the url.
:warning: if your password or token starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment