0

Let's say I have a git repository for e.g. -

https://salsa.debian.org/shirishag75-guest/gradle-build-script-

Now in my system I have -

:~/games/gradle-build-script-/.git$ cat config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = https://salsa.debian.org/shirishag75-guest/gradle-build-script-.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

Now I want to have my git username and password using https only authentication. How do I do that ?

The answer to that is ~/git-credentials . Can anybody share how it looks like or how it should look like ?

I tried to look at -

$ git config credential.helper --help
$

Doesn't tell me anything :(

Look forward to have some more info. maybe with a made-up example :)

maybe having a salsa repo. and a github repo. with made-up names and passwords so there is an idea how it looks like ?

I haven't understood what the store bit is all about -

git config credential.helper 'store [<options>]'

I tried the following from https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage

This is right now just an example with no real credentials, just to understand how it works -

shirish@debian:~$ cat .mycredentials 
protocol=https
host=github.com
username=shirish
password=s3cre7
protocol=https
host=salsa.debian.org
username=shirishag75-guest
password=s3cre7   

 $ git config --global credential.helper 'store --file ~/.mycrendials'

 ~$ cat ~/.git.store
cat: /home/shirish/.git.store: No such file or directory

what am I missing ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.