Reputation: 1000
I am working on a private repo hosted on IBM-jazz
.
First, when I wanted to clone this repo, I had to type the following command:
git clone https://user_name:[email protected]/git/repo_owner/repo_name
When doing:
git remote show origin
It shows my credentials...
Is there anyway to prevent this from happening?
Upvotes: 2
Views: 345
Reputation: 160
You can omit the credentials and use the git credential cache to cache them in memory and ease the pain of typing them. You can even store the credentials on disk, but keep in mind that this will store the password in plain-text.
A possible configuration (taken from here) for caching the credentials for 5 minutes would be:
git config credential.helper 'cache --timeout=300'
Upvotes: 0