Followers

Friday, January 22, 2021

Import p7b file to Java Keystore using keytool

Step1:

Convert p7b file fomrat to pem format using openssl

command:

openssl pkcs7 -inform der -print_certs -in file.p7b -out file.pem


Step2:

Import generated pem file into JKS file using keytool command

command:

C:\CICD>keytool -import -alias file -keystore filestore.jks -file file.pem



Monday, January 11, 2021

How to unprotect the GitLab branch

 

  How to unprotect the gitlab Branch 

 

Navigate to Project -> settings -> Repository


 






Click on Protected Branches

 


 


 








After unprotect result should be like below.


 

 

Git Reset & Git Hard Reset & undo repo to previous commits

In this article we will see how to perform hard reset on a project repo.  

when developer wants to rollback to previous commits we can follow the below procedure.

Here I am using the repo in gitlab.com.


Create a Sample Project




 






   


 New Project Created with empty repo.



 



 


 


 


 


 


 


 


we can see the list of commits.


Now we can see how to reset the file to commit old  commit:


 

Reset Process using command line:

Step a:

Clone project to your local


Step b:

Run git log command, it shows the list of commits.

command:  git log


 


Step c:

Command: git reset --hard          <commitID>


Step d:

push the latest commit to remote repository.


The above issue will come when we have enabled branch protection.

How to unprotect the Branch: Please refer this link

After unprotecting the branch we are able to push to Master branch.


Step e:

After hard reset now the repo is updated with respective commit.