# check port 22 is open #netstat -anop TCP # remember to change powershell firewall directive in install-OpenSSH-Win32.ps1 if standard win10 or server # run as admin start-process powershell -verb runAs # run top level ps script powershell -ExecutionPolicy Bypass -File .\install-OpenSSH-Win32.ps1 # DO THE SSH-ADD OF KEYS BY HAND ON WIN7 MACHINES BECAUSE PSTOOLS FETECH DOESN'T WORK # ON WIN7 ALSO USE THE Local Security Policy UI to set "NT Service\sshd" in "Replace a process level token" - this is tricky because the UI defaults in a spot that doesn't have access to the object, so select the machine first then the object will be there # Install both GitExtension and msysgit, the stop and start the sshd so that the Path vars are set correctly when the new user process is started via sshd. Use plink link to ssh to the server and ensure you have access to git # # # To make a git repo # First goto your source dir. Do a git init. This adds a .git dir. Then git add . Then git commit -m "initial data" # Now to make a remote repo, do not create a directory. Got to where you want it. git clone --bare your source dir. # A directory with your source dir name plus .git will be created: .git. In it will be the .git contents of # your source dir repo. This is the remote repo. # Now to clone from it, just git clone .git. When you do this, a directory will be created at your current # location, which has the same name as and it will contain the local repo .git dir and working files # #PS C:\>icacls .\ssh_host_dsa_key /setowner system #PS C:\>icacls .\ssh_host_dsa_key /remove otheruser #PS C:\>(get-acl .\ssh_host_dsa_key).owner #otheruser #PS C:\>icacls .\ssh_host_dsa_key #ssh_host_dsa_key NT AUTHORITY\SYSTEM:(F) # BUILTIN\Administrators:(F) # otheruser:(R) # Powershell environment for git ssh # $env:GIT_SSH_COMMAND = '"C:\Program Files\OpenSSH\ssh.exe" -vvvT' # Bash environment for git ssh # set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 GIT_SSH_COMMAND='"ssh.exe" -vvvT' git clone localhost:git_repo.git ; set +x