From 94fbbcb9021dd0eeb76be1a1f6e2286a3231fc08 Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Tue, 9 Feb 2021 10:17:54 -0500 Subject: [PATCH] add --check to the output of run.sh --help. (#970) * add --check to the output of run.sh --help. * feedback. --- docs/checks/git.md | 2 +- src/Runner.Listener/Runner.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/checks/git.md b/docs/checks/git.md index 272b8160a..0969d0544 100644 --- a/docs/checks/git.md +++ b/docs/checks/git.md @@ -22,7 +22,7 @@ The test also set environment variable `GIT_TRACE=1` and `GIT_CURL_VERBOSE=1` be ### 1. Check the common network issue - > Please check the [network doc](./network.md) + > Please check the [network doc](./network.md) ### 2. SSL certificate related issue diff --git a/src/Runner.Listener/Runner.cs b/src/Runner.Listener/Runner.cs index 63a10280f..68b0b4ecd 100644 --- a/src/Runner.Listener/Runner.cs +++ b/src/Runner.Listener/Runner.cs @@ -501,6 +501,7 @@ Options: --help Prints the help for each command --version Prints the runner version --commit Prints the runner commit + --check Check the runner's network connectivity with GitHub server Config Options: --unattended Disable interactive prompts for missing arguments. Defaults will be used for missing options @@ -510,7 +511,8 @@ Config Options: --runnergroup string Name of the runner group to add this runner to (defaults to the default runner group) --labels string Extra labels in addition to the default: 'self-hosted,{Constants.Runner.Platform},{Constants.Runner.PlatformArchitecture}' --work string Relative runner work directory (default {Constants.Path.WorkDirectory}) - --replace Replace any existing runner with the same name (default false)"); + --replace Replace any existing runner with the same name (default false) + --pat GitHub personal access token used for checking network connectivity when executing `.{separator}run.{ext} --check`"); #if OS_WINDOWS _term.WriteLine($@" --runasservice Run the runner as a service"); _term.WriteLine($@" --windowslogonaccount string Account to run the service as. Requires runasservice"); @@ -518,6 +520,8 @@ Config Options: #endif _term.WriteLine($@" Examples: + Check GitHub server network connectivity: + .{separator}run.{ext} --check --url --pat Configure a runner non-interactively: .{separator}config.{ext} --unattended --url --token Configure a runner non-interactively, replacing any existing runner with the same name: