Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for #34710, improving caching credentials with oauth mention #34712

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JDLH
Copy link

@JDLH JDLH commented Sep 24, 2024

Why:

Closes: #34710

This is based on my difficulties understanding how to get OAuth authentication from my local Git installation. The current content does not mention OAuth, or the need for organisation approval of OAuth apps not pre-approved by GitHub. Both those omissions caused obstacles for me. This is the content I wished I had at the time.

What's being changed (if available, include any code snippets, screenshots, or gifs):

Adding section about other Git credential helpers, and mention OAuth. Add a few words putting GitHub CLI and GCM in relationship to the local Git installation.

I had an earlier version of this PR, #34711 , but I inadvertently closed it. Oops. This replaces that PR. It also addresses some lint problems.

Check off the following:

  • I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).

    • For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.
  • For content changes, I have completed the self-review checklist.

Adding section about other Git credential helpers, and mention OAuth.

This is based on my difficulties understanding how to get OAuth authentication from my local Git installation. The current content does not mention OAuth, or the need for organisation approval of OAuth apps not pre-approved by GitHub. Both those omissions caused obstacles for me. This is the content I wished I had at the time.
Formatting changes to correct lint problems. Label a code fence as text. Remove docs.github.com from links to docs. Delete a traling space.

Turn a long sentence with two inline links into a 2-item list. This responds in part to "Writing for translation" style instructions.
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Sep 24, 2024
Copy link
Contributor

github-actions bot commented Sep 24, 2024

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
get-started/getting-started-with-git/caching-your-github-credentials-in-git.md fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10
fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10

fpt: Free, Pro, Team
ghec: GitHub Enterprise Cloud
ghes: GitHub Enterprise Server

Removed spurious left square bracket in line 116, to attempt a fix to lint problem "MD029, ol-prefix Ordered list item prefix".

Shortened line 126, a text error message. It is now 64 characters. Still longer than the desired 60 characters, but I don't see how to make it 4 characters shorter and still keep the example understandable. So, I expect it will still get a lint warning.

Links on lines 115 and 116 are unchanged. The link checker seems to have a problem with them, and I don't know how to fix it.
Fix a lint problem in line 116. Change number of second item in the ordered list from "2" to "1". I am guessing that every item in the list should be numbered "1".
@JDLH
Copy link
Author

JDLH commented Sep 24, 2024

I would like help diagnosing these check-links errors:

Error: Unable to find Page by '/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps'.
    To fix it, look at content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md on line 121 and see if the link is correct and active.
Error: Unable to find Page by '/organizations/managing-oauth-access-to-your-organizations-data/approving-oauth-apps-for-your-organization'.
    To fix it, look at content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md on line 122 and see if the link is correct and active.

The source text from caching-your-github-credentials-in-git.md?plain=1#L115-L116 is:

1. You must request that organization's approval for OAuth access by your helper. See "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps)".
1. The organization must approve access. See "[AUTOTITLE](/organizations/managing-oauth-access-to-your-organizations-data/approving-oauth-apps-for-your-organization)".

The public URLs of the articles to which I want to link are:

  1. https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps
  2. https://docs.github.com/en/organizations/managing-oauth-access-to-your-organizations-data/approving-oauth-apps-for-your-organization

I understand from another link checker run that I should not include the https://docs.github.com/ prefix in the link. Fair enough.

I don't understand the correct way to express those links in this article. I would appreciate guidance.

The output from test-changed-content looks to me like a consequence of the same link problem. The error message says, "Error: Unable to find Page by…" and gives the same link paths.

@JDLH
Copy link
Author

JDLH commented Sep 24, 2024

I would like help diagnosing these check-links errors:

Error: Unable to find Page by '/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps'.
    To fix it, look at content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md on line 121 and see if the link is correct and active.
Error: Unable to find Page by '/organizations/managing-oauth-access-to-your-organizations-data/approving-oauth-apps-for-your-organization'.
    To fix it, look at content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md on line 122 and see if the link is correct and active.

Interestingly, the fpt and ghec previews listed above have correct links to the GitHub articles in question. The ghes previews all give me error messages, however.

@nguyenalex836 nguyenalex836 added content This issue or pull request belongs to the Docs Content team get started Content related to "Getting Started" doc set waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert and removed triage Do not begin working on this issue until triaged by the team labels Sep 24, 2024
Copy link
Contributor

Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀

@nguyenalex836
Copy link
Contributor

@JDLH Thanks so much for opening a PR! I'll get this triaged for review ✨

OAuth credential helpers will get you immediate access to your own repos. If you work with repos controlled by an organization, or with your forks and clones of those repos, then two extra steps are necessary.

1. You must request that organization's approval for OAuth access by your helper. See "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps)".
1. The organization must approve access. See "[AUTOTITLE](/organizations/managing-oauth-access-to-your-organizations-data/approving-oauth-apps-for-your-organization)".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JDLH — the inclusion of any links to articles such as this one, which is not versioned for GHES, in an article that is versioned for GHES, will cause link errors.

We'd look at fixing these once an SME has looked at the content you're proposing.

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team get started Content related to "Getting Started" doc set needs SME This proposal needs review from a subject matter expert waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify use of OAuth credential helpers in local Git installation
3 participants