From 90954f43c6a29145956f697e0dd7fc19114988c6 Mon Sep 17 00:00:00 2001 From: Taher kathiriya <44027845+taher-k5@users.noreply.github.com> Date: Thu, 6 Oct 2022 17:54:45 +0530 Subject: [PATCH] Create 21-clone-with-github-token.md --- en/swears/tips/21-clone-with-github-token.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 en/swears/tips/21-clone-with-github-token.md diff --git a/en/swears/tips/21-clone-with-github-token.md b/en/swears/tips/21-clone-with-github-token.md new file mode 100644 index 00000000..e6e0824d --- /dev/null +++ b/en/swears/tips/21-clone-with-github-token.md @@ -0,0 +1,18 @@ +--- +tags: tip +title: Oh shit, I need to clone my repo with github token so I don't have to enter my username or password on every push or pull! +id: clone-with-github-token +order: 21 +--- + +```git +# Generate your token in Github +# Store the token somewhere safe and it only show once. +Setting-> Developer settings->Personal access tokens + +# How to use token when clone repo +git clone https://tokenCode@github.com/ksylor/ohshitgit.git +``` + +Also github now won't support password when you clone repo so if you don't want to setup ssh use this personal-access-token is good idea. also you can set timeout and permission to token so you can generate it for every envoirment. +It is very good technique for time saving. you don't need to remeber anything just use your push and pull without any hesitation.