Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike.
Packaged with this PortableApps build is the BASH emulation used to run Git from the command line. *NIX users should feel right at home, as the BASH emulation behaves just like the "git" command in LINUX and UNIX environments.
-
Since version 2.39.2 GitlabCliPortable is accessible from within the bash and CMD shells if installed.
OS | 32-bit | 64-bit |
---|---|---|
ReactOS 0.4.14 |
||
ReactOS 0.4.15 |
||
Windows XP |
||
Windows Vista |
||
Windows 7 |
||
Windows 8 |
||
Windows 10 |
||
Windows 11 |
ℹ️
|
With version 2.27 the mintty terminal is stackdumping on Windows 7 and
possibly Vista. The last version supported and tested on Windows 7 is
2.26.2 .
|
To keep the git settings and the SSH keys portable accross machines the
home and start directory of the user are set to %PAL:DataDir%\home
or in
more user friendly notation ...\PortableApps\GitPortable\Data\home
.
All the private SSH keys should be stored under the home’s .ssh
directory.
After opening a git-bash
session issue the command ssh-keygen -t ed25519
For more options and switches for ssh-keygen
issue ssh-keygen --help
or
consult the manual.
ℹ️
|
Because the key may be used on potentially unsafe hosts it is strongly advised to protect the private key with a passphrase! |
$ ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (/e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519): ⏎
Enter passphrase (empty for no passphrase): *******⏎
Enter same passphrase again: *******⏎
Your identification has been saved in /e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519
Your public key has been saved in /e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:NT+krIKluNrqEOC3jCuomgfTMBuM5ZyxRlVPHpR+f5o urs@winnie-the-poo
The key's randomart image is:
+--[ED25519 256]--+
| ....oo |
| + .= |
|+= + . . = . |
|B.* . S = |
|.O . .. S o o |
|+.=..+. . . |
|o+.oo.. . |
|+oo. .. E |
|@*o ...o+ |
+----[SHA256]-----+
Since the private SSH key is protected with a password each time git
fetches
or pulls data via the SSH protocol the password prompt appears. But one can
start an ssh-agent
add the key.
$ eval $(ssh-agent)
Agent pid 1337
$ ssh-add
Enter passphrase for /e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519: *******⏎
Identity added: /e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519 (urs@winnie-the-poo)
Once setup remote git commands over the SSH protocol work without password prompts.
$ git clone [email protected]:uroesch/GitPortable.git
Cloning into 'GitPortable'...
remote: Enumerating objects: 848, done.
remote: Counting objects: 100% (399/399), done.
remote: Compressing objects: 100% (230/230), done.
remote: Total 848 (delta 195), reused 265 (delta 128), pack-reused 449
Receiving objects: 100% (848/848), 417.09 KiB | 273.00 KiB/s, done.
Resolving deltas: 100% (382/382), done.
If PuTTY and its SSH agent pageant
is already in use or more suitable
for your environment it can be used instead of the packaged OpenSSH.
Open the program puttygen
to create a PuTTY private key.
Store the key preferably under .../PortableApps/GitPortable/Data/home/.ssh/
Open pageant
and load the generated key into memory.
Ensure the key is loaded unencrypted.
Once pageant
is running and holding keys the following command allows
git to use it for authentication.
$ eval $(ssh-pageant.exe)
ssh-pageant pid 1515
And then a git operation to verify.
$ git clone [email protected]:uroesch/GitPortable.git
Cloning into 'GitPortable'...
remote: Enumerating objects: 856, done.
remote: Counting objects: 100% (407/407), done.
remote: Compressing objects: 100% (235/235), done.
remote: Total 856 (delta 199), reused 272 (delta 130), pack-reused 449
Receiving objects: 100% (856/856), 419.32 KiB | 657.00 KiB/s, done.
Resolving deltas: 100% (386/386), done.
To create a ssh private and public key follo the instructions under
the Git Bash section they are identical under git-cmd
.
Once the keys are in place there is a CMD script which starts an agent and adds
the keys available in the home’s .ssh
directory into the store.
E:\PortableApps\GitPortable\Data\home>start-ssh-agent
Removing old ssh-agent sockets
Starting ssh-agent: done
Enter passphrase for /e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519:
Identity added: /e/PortableApps/GitPortable/Data/home/.ssh/id_ed25519 (urs@winnie-the-poo)
Once the key is added git can be used passwordless with SSH URLs.
E:\PortableApps\GitPortable\Data\home>git clone [email protected]:uroesch/GitPortable.git
Cloning into 'GitPortable'...
remote: Enumerating objects: 893, done.
remote: Counting objects: 100% (444/444), done.
remote: Compressing objects: 100% (262/262), done.
Receiving objects: 100% (893/893), 604.09 KiB | 2.65 MiB/s, done.d 449Receiving objects: 95% (849/893)
Resolving deltas: 100% (408/408), done.
For creating a PuTTY private key refer to the git-bash
section above.
To link the running pageant
process with the git command use the
start-ssh-pageant
CMD script.
E:\PortableApps\GitPortable\Data\home>start-ssh-pageant
Starting ssh-pageant...
SSH_AUTH_SOCK='/tmp/ssh-V7OwXRH4HEpm/agent.660'
Once done SSH URLs will work without asking for a password.
E:\PortableApps\GitPortable\Data\home>git clone [email protected]:uroesch/GitPortable.git
Cloning into 'GitPortable'...
remote: Enumerating objects: 893, done.
remote: Counting objects: 100% (444/444), done.
remote: Compressing objects: 100% (262/262), done.
Receiving objects: 94% (840/893), 348.01 KiB | 548.00 KiB/sremote: Total 893 (delta 221), reused 297 (delta 140), pack-Receiving objects: 100% (893/893), 604.09 KiB | 676.00 KiB/s, done.
Resolving deltas: 100% (408/408), done.
Since this is not an official PortableApp the PortableApps installer must be download first. Navigate to https://github.com/uroesch/GitPortable/releases for a selection of releases.
After downloading the .paf.exe
installer navigate to your PortableApps.com
platform Apps
Menu ❶ and select Install a new app (paf.exe)
❷.
From the dialog choose the previously downloaded .paf.exe
file. ❸
After a short while the installation dialog will appear.
The Packages found under the release page are not digitally signed so there the installation is a bit involved.
After downloading the .paf.exe
installer trying to install may result in a
windows defender warning.
To unblock the installer and install the application follow the annotated screenshot below.
-
Right click on the executable file.
-
Choose
Properties
at the bottom of the menu. -
Check the unblock box.
The only supported build platform for Windows is version 10 other releases have not been tested.
git clone https://github.com/uroesch/PortableApps.comInstaller.git
git clone -b patched https://github.com/uroesch/PortableApps.comLauncher.git
git clone https://github.com/uroesch/GitPortable.git
ℹ️
|
This is currently the preferred way of building the PortableApps installer. |
For a Docker build run the following command.
To build the installer under Ubuntu 20.04 Wine
, PowerShell
, 7-Zip
and
when building headless Xvfb
are required.
sudo snap install powershell --classic
sudo apt --yes install git wine p7zip-full xvfb
When building headless run the below command starts a virtual Xserver required for the build to succeed.
export DISPLAY=:7777
Xvfb ${DISPLAY} -ac &
git clone https://github.com/uroesch/PortableApps.comInstaller.git
git clone -b patched https://github.com/uroesch/PortableApps.comLauncher.git
git clone https://github.com/uroesch/GitPortable.git
To build the installer under Ubuntu 18.04 Wine
, PowerShell
, 7-Zip
and
when building headless Xvfb
are required.
sudo snap install powershell --classic
sudo apt --yes install git p7zip-full xvfb
sudo dpkg --add-architecture i386
sudo apt update
sudo apt --yes install wine32
When building headless run the below command starts a virtual Xserver required for the build to succeed.
export DISPLAY=:7777
Xvfb ${DISPLAY} -ac &
git clone https://github.com/uroesch/PortableApps.comInstaller.git
git clone -b patched https://github.com/uroesch/PortableApps.comLauncher.git
git clone https://github.com/uroesch/GitPortable.git