Created
April 28, 2013 07:19
-
-
Save genewoo/5476175 to your computer and use it in GitHub Desktop.
Login LDAP Authentication GitLab instance by CLI and Fetch RAW File by curl. Since LDAP authentication will create the account for you, so it's very useful to fetch file from GitLab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BASEURL=http://git | |
USERNAME=DOMAIN_USER | |
USERPASS=DOMAIN_PASSWORD | |
RAW_FILE=RAW_FILE_URI | |
# login | |
curl -s -c cookies.txt -d "username=$USERNAME&password=$USERPASS" $BASEURL/users/auth/ldap/callback -o /dev/null | |
curl -s -c cookies.txt -b cookies.txt $BASEURL$RAW_FILE | |
rm cookies.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment