Skip to content

Commit 8b04d06

Browse files
committed
feat: add credentials post
1 parent 13bef4e commit 8b04d06

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: post
3+
title: "Git Credential Caching"
4+
date: 2023-06-14 00:00:00 -0500
5+
category: "General"
6+
tags: ['git']
7+
---
8+
9+
Having a local git repo configured, I haven't yet set up ssh authentication. Instead I use HTTPS with a username and password. It can be tiresome typing in the login credentials over and over, so I typically cache the credentials with a reasonable timeout.
10+
11+
```bash
12+
git config --global user.name "patrick"
13+
git config --global credential.helper 'cache --timeout=3600'
14+
```
15+
16+
I also make sure my .git/config contains the username so I don't need to type that in over and over.
17+
18+
```conf
19+
https://<USERNAME>@github.com/path/to/repo.git
20+
```
21+
22+
More helpful information can be [found here](https://www.shellhacks.com/git-config-username-password-store-credentials/).

0 commit comments

Comments
 (0)