1 ---
2 title: npm-ping
3 section: 1
4 description: Ping npm registry
5 github_repo: npm/cli
6 github_branch: latest
7 github_path: docs/lib/content/commands/npm-ping.md
8 redirect_from:
9 - /cli-commands/npm-ping
10 - /cli-commands/ping
11 - /cli-documentation/cli-commands/npm-ping
12 - /cli-documentation/cli-commands/ping
13 - /cli-documentation/commands/npm-ping
14 - /cli-documentation/commands/ping
15 - /cli-documentation/npm-ping
16 - /cli-documentation/ping
17 - /cli-documentation/v10/cli-commands/npm-ping
18 - /cli-documentation/v10/cli-commands/ping
19 - /cli-documentation/v10/commands/npm-ping
20 - /cli-documentation/v10/commands/ping
21 - /cli-documentation/v10/npm-ping
22 - /cli-documentation/v10/ping
23 - /cli/cli-commands/npm-ping
24 - /cli/cli-commands/ping
25 - /cli/commands/npm-ping
26 - /cli/commands/ping
27 - /cli/npm-ping
28 - /cli/ping
29 - /cli/v10/cli-commands/npm-ping
30 - /cli/v10/cli-commands/ping
31 - /cli/v10/commands/ping
32 - /cli/v10/npm-ping
33 - /cli/v10/ping
34 - /commands/npm-ping
35 - /commands/ping
36 ---
37
38 ### Synopsis
39
40 ```bash
41 npm ping
42 ```
43
44 Note: This command is unaware of workspaces.
45
46 ### Description
47
48 Ping the configured or given npm registry and verify authentication. If it works it will output something like:
49
50 ```bash
51 npm notice PING https://registry.npmjs.org/
52 npm notice PONG 255ms
53 ```
54
55 otherwise you will get an error:
56
57 ```bash
58 npm notice PING http://foo.com/
59 npm ERR! code E404
60 npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
61 ```
62
63 ### Configuration
64
65 #### `registry`
66
67 - Default: "https://registry.npmjs.org/"
68 - Type: URL
69
70 The base URL of the npm registry.
71
72 ### See Also
73
74 - [npm doctor](/cli/v10/commands/npm-doctor)
75 - [npm config](/cli/v10/commands/npm-config)
76 - [npmrc](/cli/v10/configuring-npm/npmrc)