Skip to content

Instantly share code, notes, and snippets.

@roblogic
Last active May 24, 2017 06:31
Show Gist options
  • Save roblogic/6a7ea95bdaea9cc8df9d4994b8b80893 to your computer and use it in GitHub Desktop.
Save roblogic/6a7ea95bdaea9cc8df9d4994b8b80893 to your computer and use it in GitHub Desktop.

Check your github credentials.

If you log in via twitter, you will have to do the "reset password" ceremony https://github.com/password_reset

Set up .gitconfig to use proxy

Per https://stackoverflow.com/a/34258338/148889 , set up .gitconfig by doing these at the command prompt

git config --global http.sslVerify false
git config --global https.sslVerify false
git config --global http.proxy http://user:pass@yourproxy:port
git config --global https.proxy http://user:pass@yourproxy:port

Upload image

Per https://stackoverflow.com/a/43150165/148889

  1. Create a dummy gist called "my-image.jpg". Add some text (eg. "TODO"), and publish. Take note of the hash.

  2. Clone your gist:

    git clone https://gist.github.com/<hash>.git
  1. Add your image to your gist's repository:
    cp /path/to/my-image.jpg <hash>
    cd <hash>
    git add my-image.jpg
  1. Commit the image:
    git commit -m "adding my image to my gist"
  1. Update gist by pushing your modifications:
    git push origin master

At this point you will be prompted for your github/gist credentials. Use the stuff you set up in Step 1

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