git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Password for proxies from external

From
66a50120e@schuerz.at <6a50120e@schuerz.at>
Date
Nov 12, 2021, 13:07 UTC
Message-ID
<5743c211-bf8b-b485-3b81-a71b1b64bb4d@schuerz.at>
Hi there!
If searched a lot and everywhere i found the same information...

when i want to set a http-proxy for git, the configuration goes to ~/.gitconfig

```
[http]
     proxy = http://username:password@proxy.dings.bums:1234
```

So the proxy password is in cleartext written down to the config-file. The git own password-store can not be used... even no external like pass.

For aliases i can set something like
```
[alias]
     blafoo = "!f() {do something on shell}; f"
```
But this does not work for proxy-settings.

There should be a mechanism to read a password or the credentials from the shell in proxy-settings. Something like bash-subshell-construct.

```
[http]
     proxy = http://$(pass show key|grep login):$(pass show key|head 
-n1)@proxy.dings.bums:1234
```
or
```
[http]
     proxy = "!u() {pass show key|grep login}; !p() {pass show key|head 
-n1}; http://u:p@proxy.dings.bums:1234"
```

This would close the security-hole of cleartext-credentials in config-files...

thank you
Jakob
Next: Jeff King
Message 1 of 2 in “Password for proxies from external”
  1. 6a50120e@schuerz.atNov 12, 2021
  2. Jeff KingNov 12, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.