| machine github.com | |
| login technoweenie | |
| password SECRET | |
| machine api.github.com | |
| login technoweenie | |
| password SECRET |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Stick this in ~/.netrc with chmod 600 or something. You can curl the api as yourself with |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
noamtm
commented
Jan 7, 2013
|
What about per-repository login? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
g2p
Mar 20, 2013
@noamtm I just checked, netrc or gitcredentials aren't up to the task (the latter has an option to match on host paths, but prefix matches are missing so it's only semi-convenient). If you control the url you should put the username in the url or use host aliases, both ssh (man ssh_config) and git (git help config then /insteadof) have them; if you can't (go get or pip remote requirements), there is no convenient solution.
g2p
commented
Mar 20, 2013
|
@noamtm I just checked, netrc or gitcredentials aren't up to the task (the latter has an option to match on host paths, but prefix matches are missing so it's only semi-convenient). If you control the url you should put the username in the url or use host aliases, both ssh ( |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madarche
Dec 23, 2013
Note about a limitation: password in .netrc file should not contain spaces, since the .netrc file is parsed against spaces, tabs and new-lines.
madarche
commented
Dec 23, 2013
|
Note about a limitation: password in |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
soupdiver
commented
Jul 9, 2014
|
Thanks man! Exactly what I needed |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kprikshit
May 1, 2015
Any way to store password here not in plain text.
It's too risky to store in plaintext
kprikshit
commented
May 1, 2015
|
Any way to store password here not in plain text. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
snowyu
Jul 24, 2015
github supports the access token instead of password: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
snowyu
commented
Jul 24, 2015
|
github supports the access token instead of password: https://help.github.com/articles/creating-an-access-token-for-command-line-use/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rhiann0n
Feb 3, 2016
With respect, I would definitely recommend authenticating to github using ssh with decryption key instead of the .netrc method, as it's insecure: https://help.github.com/articles/generating-an-ssh-key/
rhiann0n
commented
Feb 3, 2016
|
With respect, I would definitely recommend authenticating to github using ssh with decryption key instead of the .netrc method, as it's insecure: https://help.github.com/articles/generating-an-ssh-key/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewspiers
commented
Feb 7, 2017
|
@rhiannon that's all good until you are somewhere that blocks 22 outbound. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
felipe1982
Mar 14, 2017
@andrewspiers I thought that you can alternatively use port 443 outbound for SSH traffic... Or am I confused with bitbucket...?
felipe1982
commented
Mar 14, 2017
|
@andrewspiers I thought that you can alternatively use port 443 outbound for SSH traffic... Or am I confused with bitbucket...? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
miradnan
commented
Mar 23, 2018
•
|
Thanks! Exactly what I needed |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
LiviuLvu
May 19, 2018
Is it possible to add a default editor within this file?
I am tring to use git pull-request and keep getting this error:
$EDITOR is unset, you will not be able to edit the pull-request message
LiviuLvu
commented
May 19, 2018
|
Is it possible to add a default editor within this file? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kopax
commented
Oct 2, 2018
|
Hi, what about |
Stick this in ~/.netrc with chmod 600 or something. You can curl the api as yourself with
curl -n https://api.github.com/user