isacikgoz / gitbatch

manage your git repositories in one place
MIT License
1.54k stars 53 forks source link

HTTP authentication support? #75

Open Scottapotamas opened 5 years ago

Scottapotamas commented 5 years ago

I noticed that the wiki only mentions SSH based repo authentication, I'm forced to use HTTPS due to firewall rules.

I configured a (long) timeout on the credentials store for git, allowing it to retain my https credentials against repos.

While gitbatch allows for interactive HTTPS auth requests currently, the granted permission isn't maintained across invocations where git normally would cache the credentials.

Is there a recommended way of handling this?

isacikgoz commented 5 years ago

Hello @Scottapotamas, I never had a chance to test HTTP authentication but it should work fine just like HTTPS. In wiki, I just wanted to mention that SSH auth's are smooth as butter when you work with git binary itself 👍 If you are using MacOS iCloud Keychain stores HTTP/HTTPS credentials and it shouldn't prompt you to enter credentials. GNOME also has a similar software if you are using GNOME desktop.

afranke commented 4 years ago

I have a few repos that also force me to use (the same) HTTPS auth and I’m using the GNOME keyring for their password. Even when it is unlocked (by e.g. trying git fetch in the terminal prior to running gitbatch) I get the ! authentication required (u) message.

When I select multiple repos and provide authentication details for of them with u, it is not taken into account for the other ones.

isacikgoz commented 4 years ago

Hello @afranke actually it is intended to ask credentials for each login, since some repositories may require different credentials. Also for security reasons I don't want to store them anywhere.

However, it may be a good idea to store credentials while running the program and try to authenticate with that information on the next repo only if share the same "user.email" property.

ScatteredRay commented 3 years ago

I'm having this problem also on Windows, It's exasperated by using 2fa for GitHub, and having to have an App Token,

The standard Git client is configured to use wincred with

[credential] helper = wincred

I wonder if it's possible to use the same helpers?