Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created June 6, 2012 21:42
Show Gist options
  • Select an option

  • Save ahoward/2885020 to your computer and use it in GitHub Desktop.

Select an option

Save ahoward/2885020 to your computer and use it in GitHub Desktop.
Fix Username/Password prompting for github repos cloned via https scheme

github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers

in your home directory create a file called '.netrc', for example

/Users/ahoward/.netrc

in it put these contents

machine github.com
login YOUR_GITHUB_USERNAME
password YOUR_GITHUB_PASSWORD

fixed!

@Ola-rewaju

Copy link
Copy Markdown

None of this things is working

@osandajanuka

Copy link
Copy Markdown

how to put commands to this folder?

@andreborgescastro

Copy link
Copy Markdown

Worked fine to me. Thanks man.

@scottjmaddox

Copy link
Copy Markdown

Works great in Termux on Android!

@hysh1

hysh1 commented Dec 7, 2021

Copy link
Copy Markdown

work

Can you hack an account for me

@tesddev

tesddev commented Dec 7, 2021

Copy link
Copy Markdown

like magic, it works!

@tesddev

tesddev commented Dec 7, 2021

Copy link
Copy Markdown

Works on Mac OS

@Samsontyler7

Copy link
Copy Markdown

How to remove 2 set password

@ad006875

Copy link
Copy Markdown

Screenshot_2022-05-31-09-03-46-76_84d3000e3f4017145260f7618db1d683

@Bhatayan

Copy link
Copy Markdown

IMG_20220614_172425
What I do plz help

@algokra

algokra commented Oct 7, 2022

Copy link
Copy Markdown

Authentication failed for 'https://github.com/Zucccs/PhoneSploit/'

@aminesad

Copy link
Copy Markdown

It asks me to put my username and password, what do I do?

@vk3xem

vk3xem commented Jan 17, 2023

Copy link
Copy Markdown

How was I subscribed to this thread? I just received an email about the thread that I have never seen before!

@Alimozaffari9

Copy link
Copy Markdown

سلام کسی هست ازمن هم یوزرنم با پسورد میخاد

@vidya-syt

Copy link
Copy Markdown

2021-02-20_04-26-57

من مشکل یورنیم وپسورد دارم کمکم کنید

im getting same , whats the solution ? could you please>

@Kamilhassan786

Copy link
Copy Markdown

خاو شن کرار

@LuizFTS

LuizFTS commented Jun 26, 2023

Copy link
Copy Markdown

2021-02-20_04-26-57
من مشکل یورنیم وپسورد دارم کمکم کنید

im getting same , whats the solution ? could you please>

I tried to clone with my username and my password and it didn't work. So I checked the docs and it says that instead of our password, we have to type our access token.

This link should help to generate your personal access token and then clone the git repository:
https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens

@mimisad916

Copy link
Copy Markdown

2021-02-20_04-26-57

من مشکل یورنیم وپسورد دارم کمکم کنید

you can just write git clone then you type this link https://github.com/suljot/shellphish.git

@AliHCl

AliHCl commented Sep 25, 2023

Copy link
Copy Markdown

2021-02-20_04-26-57

من مشکل یورنیم وپسورد دارم کمکم کنید

First, type the command 'gh auth login' in the command line, then use the arrow keys on your keyboard to select the option 'GitHub.com' and press Enter. After that, choose the 'http' , and then log in to your account through browser.

@miraclemarko

Copy link
Copy Markdown

### THIS IS FOR FIX SOLUTION YOUR PROBLEM.

Run

git config --global credential.helper store

DONE. THANKYOU

@Queetinliu

Copy link
Copy Markdown

i use gitlab,yes use this solution i can git clone without username password promption.

@pooriar1991

Copy link
Copy Markdown

2021-02-20_04-26-57

من مشکل یورنیم وپسورد دارم کمکم کنید
یوزر پسورد گیت هاب‌ت رو بزن اکی میشه

@MrSavage6995

Copy link
Copy Markdown

Probably dumb question but where it says your_username I use mine lmao 🤣

@mohgoro

mohgoro commented May 7, 2024

Copy link
Copy Markdown

Cela a bien fonctionné pour moi. Merci mec.

@Ikyanakbaik

Copy link
Copy Markdown

Screenshot_20240525-104548
Ini gimana

@EJEASIntercom

Copy link
Copy Markdown

This code is very useful for me, thanks for sharing! EJEAS

@Abdallah-222

Copy link
Copy Markdown

How to remove 2 set password

@Abdallah-222

Copy link
Copy Markdown

G

@LIGHT-JOSHUA

Copy link
Copy Markdown

Works great in Termux on Android!

How did you do it?

@sulamanshoaib40

Copy link
Copy Markdown

Termux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment