Skip to content

Instantly share code, notes, and snippets.

@rafaelnp
Created June 30, 2020 18:09
Show Gist options
  • Save rafaelnp/4f4407ca547113735f9880c2dee70943 to your computer and use it in GitHub Desktop.
Save rafaelnp/4f4407ca547113735f9880c2dee70943 to your computer and use it in GitHub Desktop.
Clone git repository using token for http transport
#!/bin/sh
export GIT_USER=my_user
export GIT_TOKEN=my_token
export GIT_REPOSITORY=my_repository
export GIT_SERVER=my_server
git clone https://${GIT_USER}:${GIT_TOKEN}@${GIT_SERVER}/${GIT_REPOSITORY}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment