this post was submitted on 04 Aug 2023
479 points (95.8% liked)

Programmer Humor

32054 readers
1494 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

Closed-source quality be like

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 1 year ago (1 children)

have at it!

taken from Gitlab's manual page for creating a key, but i wonder what else could be done to expand on it.

#~/.gitconfig
[includeIf "hasconfig:remote.*.url:https://gitlab.com/**"]
path = /path/to/gitlab.gitconfig
[includeIf "hasconfig:remote.*.url:https://github.com/**"]
path = /path/to/github.gitconfig

#example gitlab gitconfig from the included path
[user]
name = Your Name
email = [email protected]
signingkey = 0000999988887777

[commit]
gpgsign = true

if all works well, Git should be able to automatically use the selected key depending on the repo's stated remote server.

[–] [email protected] 4 points 1 year ago (1 children)
[–] [email protected] 2 points 1 year ago