GithubHelp home page GithubHelp logo

portable-git-setup-script's Introduction

Gradle script to setup portable Git to use SSH

When using Git, SSH is the best way to authenticate with server. If HTTPS is used, you need to type the password every time. But SSH is not that easy to setup. You can find a lot of online articles about how to set this up correctly. You need to generate correct SSH keys and add your public key to GitHub or Bitbucket using their web pages. You also need to keep ssh-agent running to avoid typing passphrase every time.

This script tries to solve this problem by setting up Git quickly. This script can

  • Download portable Git binaries and configure it
  • Create SSH keys and install keys to remote server

How to use

This script is written using Gradle, so you need to download and configure Gradle correctly. You can find instructions on Gradle's website.

You also need to install 7-zip to unzip package of portable Git bundle. 7-zip is assumed to be installed in the default C:\Program Files\7-Zip folder. If you changed that, running Gradle using -P7zipDir={7ZIP_DIR} to override it.

Then you need to change settings in user.conf file to include your name and email.

git_name = You name
git_email = [email protected]

After that, you can run this script to download portable Git binaries and configure it with GitHub or Bitbucket.

  • For GitHub, run gradle installSSHKey_github.
  • For Bitbucket, run gradle installSSHKey_bitbucket.

After the script runs successfully, you can a git folder in your current directory, use git-bash.bat or git-cmd.bat to start Git. When the first time you are using Git, you need to input the passphrase, the value is gituser.

portable-git-setup-script's People

Contributors

alexcheng1982 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.