From 5faf473ee216694d428a26671637833fe882f2e7 Mon Sep 17 00:00:00 2001 From: wolf99 <281700+wolf99@users.noreply.github.com> Date: Sat, 14 May 2022 20:18:26 +0100 Subject: [PATCH 1/2] Add broken link checking Action Also adjusts the entire workflow to only run if a PR or push contains changes to a markdown file --- .github/workflows/lint-docs.yml | 37 ++++++++++++++++++++++++++++++++- .lycheeignore | 2 ++ README.md | 2 +- docs/netconfig.md | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .lycheeignore diff --git a/.github/workflows/lint-docs.yml b/.github/workflows/lint-docs.yml index c723963ea..8965513dd 100644 --- a/.github/workflows/lint-docs.yml +++ b/.github/workflows/lint-docs.yml @@ -4,16 +4,51 @@ on: workflow_dispatch: push: branches: [ main, linux ] + paths: + - '**.md' + - '.github/workflows/lint-docs.yml' pull_request: branches: [ main, linux ] + paths: + - '**.md' + - '.github/workflows/lint-docs.yml' jobs: lint-markdown: name: Lint markdown files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - uses: DavidAnson/markdownlint-cli2-action@744f913a124058ee903768d3adb92a4847e5d132 with: globs: "**/*.md" + + check-links: + name: Check for broken links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + + - name: Run link checker + # For any troubleshooting, see: + # https://github.com/lycheeverse/lychee/blob/master/docs/TROUBLESHOOTING.md + uses: lycheeverse/lychee-action@76ab977fedbeaeb32029313724a2e56a8a393548 + + with: + # user-agent: if a user agent is not specified, some websites (e.g. + # GitHub Docs) return HTTP errors which Lychee will interpret as + # a broken link. + # no-progress: do not show progress bar. Recommended for + # non-interactive shells (e.g. for CI) + # inputs: by default (.), this action checks files matching the + # patterns: './**/*.md' './**/*.html' + args: >- + --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" + --no-progress . + fail: true + env: + # A token is used to avoid GitHub rate limiting. A personal token with + # no extra permissions is enough to be able to check public repos + # See: https://github.com/lycheeverse/lychee#github-token + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 000000000..b457929b0 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,2 @@ +godaddy\.com[\\/]?$ +file:[\\/][\\/][\\/].* diff --git a/README.md b/README.md index 30fc56930..b9a2d4be1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager) (GCM) is a secure Git credential helper built on [.NET](https://dotnet.microsoft.com) that runs on Windows, macOS, and Linux. -Compared to Git's [built-in credential helpers]((https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)) (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), Azure DevOps Server (formerly Team Foundation Server), GitHub, Bitbucket, and GitLab. +Compared to Git's [built-in credential helpers](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage) (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), Azure DevOps Server (formerly Team Foundation Server), GitHub, Bitbucket, and GitLab. Git Credential Manager (GCM) replaces the .NET Framework-based [Git Credential Manager for Windows](https://github.com/microsoft/Git-Credential-Manager-for-Windows) (GCM), and the Java-based [Git Credential Manager for Mac and Linux](https://github.com/microsoft/Git-Credential-Manager-for-Mac-and-Linux) (Java GCM), providing a consistent authentication experience across all platforms. diff --git a/docs/netconfig.md b/docs/netconfig.md index 35cf9dc80..88aab2b7f 100644 --- a/docs/netconfig.md +++ b/docs/netconfig.md @@ -114,7 +114,7 @@ $ git clone https://ghe.example.com/john.doe/myrepo fatal: The remote certificate is invalid according to the validation procedure. ``` -The **recommended and safest option** is to acquire a TLS certificate signed by a public trusted certificate authority (CA). There are multiple public CAs; here is a non-exhaustive list to consider: [Let's Encrypt](https://letsencrypt.org/), [Comodo](https://www.comodoca.com/), [Digicert](https://www.digicert.com/), [GoDaddy](https://www.godaddy.com/web-security/ssl-certificate), [GlobalSign](https://www.globalsign.com/en/ssl/). +The **recommended and safest option** is to acquire a TLS certificate signed by a public trusted certificate authority (CA). There are multiple public CAs; here is a non-exhaustive list to consider: [Let's Encrypt](https://letsencrypt.org/), [Comodo](https://www.comodoca.com/), [Digicert](https://www.digicert.com/), [GoDaddy](https://www.godaddy.com/), [GlobalSign](https://www.globalsign.com). If it is not possible to **obtain a TLS certificate from a trusted 3rd party** then you should try to add the _specific_ self-signed certificate or one of the CA certificates in the verification chain to your operating system's trusted certificate store ([macOS](https://support.apple.com/en-gb/guide/keychain-access/kyca2431/mac), [Windows](https://blogs.technet.microsoft.com/sbs/2008/05/08/installing-a-self-signed-certificate-as-a-trusted-root-ca-in-windows-vista/)). From 8d6b33b5b6f639e36abd89f7b071bc06e6e9343e Mon Sep 17 00:00:00 2001 From: wolf99 <281700+wolf99@users.noreply.github.com> Date: Sun, 24 Jul 2022 14:04:16 +0100 Subject: [PATCH 2/2] Ignore GitLab FAQ link --- .lycheeignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.lycheeignore b/.lycheeignore index b457929b0..2e55bfc1e 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -1,2 +1,3 @@ godaddy\.com[\\/]?$ +gitlab\.com/-/profile/applications file:[\\/][\\/][\\/].*