5

How do I stay logged in after I login to the git server with GitAhead software?

  • it requires a log in every few minutes
Jason Haslam
  • 2,617
  • 13
  • 19
Omzig
  • 861
  • 1
  • 12
  • 20

9 Answers9

5

Following worked for me.

On GitAhead click on the gear icon on your repository or go to repository > Configure repository. Then click on "Edit config File"

Add password by adding a colon at the end of the username/email

https://<USERNAME>:<PASSWORD>@github.com

Should be like this

[remote "origin"]
url = https://<USERNAME>:<PASSWORD>@github.com/{username}/{repo_name}.git
fetch = +refs/heads/*:refs/remotes/origin/*

Never use your account password. Use "personal access token" as the password, if you don't have it you can generate it in Github. Have a expiry date so that it will be safe, or you can generate one without expiration, your choice.

https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

Same thing applies to bitbucket as well.

https://<USERNAME>:<PASSWORD>@bitbucket.org/{username}/{repo_name}.git
webfatic
  • 84
  • 1
  • 4
4

GitAhead is using Git for credentials helpers (libgit2 for the rest)

So make sure your credentials helper is set (to "manager" on Windows, OSX Keychain on Mac) and try, from a Git session, to type:

git ls-remote https://url/of/remote/repo

That will trigger a popup, and cache your credentials.
Then relaunch GitAhead (using the same user account, with the same environment), and see if the issue persists.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Sometimes happens that we have git key and config perfectly configured and we are trying to clone via https link :-) – m3nda Jul 21 '20 at 01:04
0

Turns out what fixed it for me was removing the username@ off of the URL and then changing 2 settings.

git config --global credential.helper manager

There is more information located here on the subject.

This is the document I got the settings from.

Omzig
  • 861
  • 1
  • 12
  • 20
  • Don't you overwrite the *same* setting twice? – VonC Feb 27 '19 at 20:14
  • I am new to git, from what i can tell one sets the cred helper to your windows cred manager, then the other one tells the cache to not timeout every 15min. – Omzig Feb 27 '19 at 20:28
  • Nope: a credential helper of type manager (that the the GCM: the Microsoft Git Credential Manager, https://github.com/Microsoft/Git-Credential-Manager-for-Windows) has no notion of "cache timeout". – VonC Feb 27 '19 at 20:39
0

Open Tools > Options

Check the box on "Store credentials in secure storage"

If still not work, Disable automatic fetch and use fetch manually

Dita Aji Pratama
  • 710
  • 1
  • 12
  • 28
0

I use credential Helper on Global config, and that's all.

Sample using with AWS

~/.gitconfig

    [credential]
        helper = !aws codecommit credential-helper $@
        UseHttpPath = true
LKF
  • 143
  • 1
  • 6
0

I solved this by using a credential manager i.e GNOME Keyring Disable and re-enable "Store credentials in secure storage" then enter the your credentials once again and it shouldn't ask again.

Kaiden
  • 1
  • 1
0

So if it keeps poping up and it wont save the settings. Run the application where you run GIT as Administrator

type: git config --edit --system

and set store or wincred if you have windows credentials.

The problem that it pops up even if you store it is that git has no permissions to write the git configuration file

Teo
  • 1
  • 1
    Please add further details to expand on your answer, such as working code or documentation citations. – Community Aug 27 '21 at 15:01
0

Another option: use ssh URL instead of http, and register your public key with github.

jws
  • 2,171
  • 19
  • 30
0

I've run into this same problem with a devops repository. Ultimately trying to log in with my password was the problem. When I obtained a Personal Access Token and specified that as the password, GitAhead did retain the credentials and everything worked as expected.

TomMhC
  • 133
  • 6