ソースを参照

Update Personal Access Tokens.md

description of using PAT for https
Brendan Black 1 年間 前
コミット
7afbd24a12
1 ファイル変更42 行追加0 行削除
  1. 42 0
      Personal Access Tokens.md

+ 42 - 0
Personal Access Tokens.md

@@ -0,0 +1,42 @@
+
+#Personal Access Tokens
+
+Personal Access Tokens are used for HTTPS authentication & linking to other projects for continuous integration type work 
+
+To create, select your profile (top right), Your Settings, then Applications (on the left list)
+
+It should come up with Manage Personal Access Tokens
+
+you can Generate New Token (it will ask for a Unique name for that Token) and the token (it looks like a list of random characters) will appear near the top - you must copy this to a text file & save as it will disappear after you leave the page
+
+This token can then be used instead of a password for https authentication 
+
+#Adding a PAT to the git config for a project
+
+The git config is inside the project in a hidden directory called .git  - you can either edit the file called config in that directory directly or use something like GitHub Desktop to change the remote setting
+
+In GitHub Desktop with the repo you want to change selected, select Repository from the menu, then select Repository Settings... at the bottom. It will bring up a window with Remote, Ignored Files, & Git Config on the left - select Remote
+
+under Primary remote repository (origin) the url will be displayed
+
+the format for https is
+
+https://<username>:<password>@<hostname>/<project-or-group>/<repository-name>.git
+
+So without any username/password for the FGUK/FGUK-Test repo we get:
+
+https://fguk.doghouselabs.dev/FGUK/FGUK-Test.git
+
+To use the Personal Access Token we edit the line to something like this: (using the random string of characters that we copied to a text file earlier for personal-access-token)
+
+https://your-username:personal-access-token@fguk.doghouselabs.dev/FGUK/FGUK-Test.git
+
+You should then be able to access (push/pull) using https
+
+
+
+
+
+
+
+