Skip to content

Instantly share code, notes, and snippets.

@d48
Forked from hubgit/facebook-login.sh
Created August 28, 2012 17:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save d48/3501047 to your computer and use it in GitHub Desktop.
Save d48/3501047 to your computer and use it in GitHub Desktop.
Login to Github using cURL
#!/bin/bash
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
COOKIES='cookies.txt'
USER_AGENT='Firefox/3.5'
curl -X POST 'https://github.com/login' --verbose --user-agent $USER_AGENT --data-urlencode "name=${EMAIL}" --data-urlencode "pass=${PASS}" --cookie $COOKIES --cookie-jar $COOKIES
curl -X GET 'https://github.com/dashboard/pulls' --verbose --user-agent $USER_AGENT --cookie $COOKIES --cookie-jar $COOKIES
@davidrj77
Copy link

genial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment