Re: Credential error - Cache credential helper does not work properly
- From
Matthias Aßhauer <mha1993@live.de>
- Date
- Jan 9, 2024, 16:12 UTC
- Message-ID
- <DB9P250MB0692D62AD8AEC9F50A72C733A56A2@DB9P250MB0692.EURP250.PROD.OUTLOOK.COM>
- In-Reply-To
- <FRYP281MB329114171822EE43AF9C8C0DFD6A2@FRYP281MB3291.DEUP281.PROD.OUTLOOK.COM>
On Tue, 9 Jan 2024, Lopez Sanchez, Jose Maria wrote:
Show 7 quoted lines
> Dear Mr. / Ms. > > I am José María López Sánchez a senior system engineer working for the EDAG Group company. We are willing to use GIT to start controlling our project versions. > I have an issue when I want to stop inserting repeatedly my credentials. The cache function is not working somehow. > I have typed the following: > >> C:\Users\jl83870\Desktop\00_temp\GIT EAGEL\eagel-project>git config credential.helper 'cache
Looks like you're running this on Windows, so you're probably using Git for Windows, where this helper will error out with the message "fatal: credential-cache unavailable; no unix socket support", even when otherwise configured correctly [1]. If you compiled your own git (2.34.0 or newer) without NO_UNIX_SOCKETS this helper should work on Windows 10 build 17063 and newer [2][3]. You seem to be running this in CMD or maybe powershell. Different quoting rules apply for the two, but the leading "'" before the "cache" is definitely wrong without a trailing counterpart.
[1] https://github.com/git-for-windows/git/issues/3892 [2] https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ [3] https://github.com/git/git/commit/bb390b1f49406d967e8bf3401337cf1d9535f820
Show 11 quoted lines
> > Then I introduced once my credentials to store them in cache. If the command worked, the second time that I attempted to pull the remote server, I should not have typed the credentials again to be able to trigger the command. > >> C:\Users\jl83870\Desktop\00_temp\GIT EAGEL\eagel-project>git pull origin >> git credential-'cache get: -c: line 0: unexpected EOF while looking for matching `'' >> git credential-'cache get: -c: line 1: syntax error: unexpected end of file >> Username for 'https://csp.edag.de': jl83870 >> Password for 'https://jl83870@csp.edag.de': >> git credential-'cache store: -c: line 0: unexpected EOF while looking for matching `'' >> git credential-'cache store: -c: line 1: syntax error: unexpected end of file >> Already up to date.
The superfluous "'" made it into the config file and is causing these error messages.
Show 7 quoted lines
> As I mentioned above, when I want to pull again, appears the same previous code. > > I have also tried with the below options: > - git config credential.helper cache (without ‘ ) > - git config credential helper cache --timeout=1800 > - git config credential.helper ‘cache --timeout=1800’ > - git config credential.helper ‘cache [--timeout=1800]’
I assume the "‘" and "‘" are supposed to be "'" and your MUA mangled them a little. Otherwise that's definitely part of the problem. If you're on CMD you want either
> git config credential.helper cache
or
> git config credential.helper "cache --timeout=1800"
If you're on powershell
> git config credential.helper 'cache --timeout=1800'
should also work.
Do note that the Git documentation assumes a POSIX shell when it gives examples of commands.
Best regards
Matthias
Show 25 quoted lines
> Am I programming something wrong? Could you please help me with it? > > Mit freundlichen Grüßen / Best regards / Saludos cordiales > i.A. José María López Sánchez > Senior Systemingenieur Antriebsstrang / Senior Systems engineer Drivetrain / Ingeniero senior de sistemas de trenes de transmisión > Fahrzeug-Integration / Vehicle Integration / Integración de vehículos > > EDAG Engineering Spain, S.L I Reesbergstraße 1 I 36039 Fulda I Germany > Phone: +49 661 6000-83870 > E-Mail: jose.maria.lopez.sanchez@edag.com I www.edag.com > > YOUR GLOBAL MOBILITY AND > INDUSTRY ENGINEERING EXPERTS > Find us online: LinkedIn I XING I Facebook I Instagram I Twitter I YouTube I TechInsights > > EDAG Engineering Spain, S.L, Carretera del Prat, 65, E-08940 Cornellá de Llobregat (Barcelona), Spanien > El court register: Registro Mercantil de Barcelona, Tomo 41564, Folio 15, Hoja 92217 > > Please consider the environment before printing this e-mail. > > This e-mail may contain confidential and / or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. > > ________________________________ > Die Pflichtinformationen nach Art. 12 ff. DSGVO erhalten Sie hier<https://www.edag.com/de/rechtliches/datenschutz-teams-e-mail>. / Mandatory information pursuant to Article 12 et seq. GDPR can be found here<https://www.edag.com/en/legal/data-privacy-teams-e-mail>. >