devguide icon indicating copy to clipboard operation
devguide copied to clipboard

Improvement to Lifecycle of a Pull Request at git push origin

Open MaxwellDupre opened this issue 4 years ago • 2 comments

Where:

When all of your changes are committed (i.e. git status doesn’t list anything), you will want to push your branch to your fork:

git push origin <branch name>

This will get your changes up to GitHub.

There is a step missing which gave me some issue. That is the bit about the git command responds with username and password. If you enter your GitHub password the response is:

Username for 'https://github.com': Password for 'https://@github.com': 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://github.com//cpython.git/'

So I suggest adding enough info to get the beginners around this such that the page now reads:

Ensure that you have created a personal access token link. Note that you will likely need the token until your changes have been accepted. When all of your changes are committed (i.e. git status doesn’t list anything), you will want to push your branch to your fork:

git push origin <branch name>

At the password prompt: Password for 'https://@github.com':

Enter you personal access token (ghp_1e3f...) instead of your usual GitHub password. This will get your changes up to GitHub.

MaxwellDupre avatar Dec 23 '21 12:12 MaxwellDupre

I don't want to recommend to create PAT manually. Users can use SSH, CredentialManager, or create PAT automatically with gh auth login too.

I prefer just adding a link to this section. https://docs.github.com/ja/authentication/keeping-your-account-and-data-secure/about-authentication-to-github#authenticating-with-the-command-line

methane avatar Dec 24 '21 03:12 methane

Hi, That's fine as long as others don't fall into the pit that I did.

MaxwellDupre avatar Dec 24 '21 11:12 MaxwellDupre