–
title: creating new GPG userid
date: 2017-05-01 14:17:12
tags:
Purpose
you want to store private content in public repositories like (secret KEYs) and other credentials which is necessary in repository but not for all collaberator.
in order to achieve the same you need to use ‘git-crypt’ which require a GPG UserID to be exist.
How to generate add newuserID and generate pair of secure public and secret key
- open ‘git bash’ on windows or terminal in ubuntu
- type
gpg --gen-key
an interactive prompt will appear choose the options accordingly.
it will ask for type of KEY, go ahead and press ‘enter’. - enter key size, default is 2048. press
enter
to choose default.- set the expire time, this option spesify how long key should be valid for, choose accordingly if you want to set other then option ‘never expires’
type0
it will set the expiry duration to never. Key is not going to expire
- set the expire time, this option spesify how long key should be valid for, choose accordingly if you want to set other then option ‘never expires’
- it will ask for confirmation, type
y
and hitenter
- set userID, an combination of alphabets which GPG can recognized uniquely (do not use spaces, it causes issues in few operations) for instance I am taking username as ‘thetechblog’
- enter email address
- enter comment
- it will ask for confirmation, enter
o
to proceed alternative you can modify your entries by
enteringN
for changing name
enterC
to change comment
enterE
to change email - enter password
- it will take time to generate random bytes. good options to generate random bytes during this process is
1 move your mouse
2 perform disk operation I/O
if you are using ubuntu in headless environment then try to install / upgrade packages or copy / paste operation on the OS.
installing node modules worked for me.