From 5179cf087bcd02c680ffb8dc53f2eff687c15e89 Mon Sep 17 00:00:00 2001
From: Dennis Ahrens <dennis.ahrens@hs-hannover.de>
Date: Wed, 22 Aug 2018 15:00:29 +0200
Subject: [PATCH] A little bit more verbose and troubleshooting info

---
 Install.ps1 |  5 +++--
 README.md   | 22 +++++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/Install.ps1 b/Install.ps1
index df22c3c..79cf286 100644
--- a/Install.ps1
+++ b/Install.ps1
@@ -56,11 +56,12 @@ if (!(Test-Path $sshKeyName) ) {
 }
 
 if (!(Test-Path $sshKeyName) ) {
-    "Key generation not successful"
+    "Key generation not successful. Try yourself to see whats wrong:"
+    "$sshKeygenExe -b 4096 -f $sshKeyName -N '' "
     exit
 }
 
-"You now need to tell gitlab about this ssh public key and can proceed with what you want to install"
+"You now need to tell gitlab (Dennis Ahrens or Artiom Lukyanchyk) about this ssh public key"
 ""
 cat $sshPublicKey
 ""
diff --git a/README.md b/README.md
index c29e3db..95d7984 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,13 @@
 
 Use this repository to bootstrap git on your windows box.
 
+## What it does in detail
+
+* install [just-install](https://just-install.it/), if not present
+* afterwards it install git, if not present
+* creates an ssh keypair located in `C:\hshgitlab\id_rsa` and `C:\hshgitlab\id_rsa.pub`
+* prints the public key on your console
+
 ## Usage
 
 Be careful, this executes code directly on your machine. You are expected to read the script before you execute it.
@@ -10,10 +17,15 @@ Be careful, this executes code directly on your machine. You are expected to rea
 Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://lab.it.hs-hannover.de/powershell/bootstrap-git/raw/master/Install.ps1'))
 ```
 
-## What it does in detail
+## Troubleshouting
+
+It might happen that you receive an error, because your OS is not willing to speak TLS1.2:
 
-* The script install [just-install](https://just-install.it/), if not present.
-* Afterwards it install git, if not present.
-* Finally it creates an ssh keypair located in `C:\hshgitlab\id_rsa` and `C:\hshgitlab\id_rsa.pub`
-* It also prints the public key on your console in the end.
+`The request was aborted: Could not create SSL/TLS secure channel`
+
+In this case you need to teach your windows that it should use TLS 1.2 using this command:
+
+```powershell
+[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
+```
 
-- 
GitLab