Commit&Push with a Different Username and Credentials — GitHub

Photo by Andrew Neel on Unsplash
git initgit config user.name "your_github_username"git config user.email "your_github_email"git add .git commit -m "Initial Commit"git branch -M mastergit remote add origin https://your_github_username:access_token_provided_by_github@github.com/your_github_username/your_project_name.git
git config --global user.name "your_github_username"
git config --global user.email "your_github_email"
your_project_name git:(master) git push -u origin master
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://your_github_username:your_github_password@github.com/your_github_username/your_project_name.git/'

How to Generate a Personal Access Token

git remote set-url origin https://your_github_username:your_new_access_token@github.com/your_github_username/your_project_name.git

I would love to change the world, but they won’t give me the source code | coding 👩🏼‍💻 | coffee ☕️ | jazz 🎷 | anime 🐲 | books 📚 | drawing 🎨

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Nearshoring Software Development — The Benefits

SovTech nearshoring software development

Implement game leaderboard using Redis

Generating Privacy Policy with Iubenda

Git and Github : from scrach

What is progressive web app ?

SRE / DevOps / Kubernetes Weekly Collection#60(Week 12, 2021)

Why Python Is My New Favorite Programming Language

Tutorial — Create Your Own Template for Android Studio

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nil Seri

Nil Seri

I would love to change the world, but they won’t give me the source code | coding 👩🏼‍💻 | coffee ☕️ | jazz 🎷 | anime 🐲 | books 📚 | drawing 🎨

More from Medium

Java 17 for the impatient

Learning to write unit tests for a real world application

CRUD in short

Spring boot security role base using jsp