You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
255
-
256
-
```javascript
257
-
const { setLogLevel } =require("@azure/logger");
258
-
259
-
setLogLevel("info");
260
-
```
252
+
For infomation about troubleshooting, refer to the [troubleshooting guide].
261
253
262
254
## Next steps
263
255
@@ -291,3 +283,4 @@ If you'd like to contribute to this library, please read the [contributing guide
This troubleshooting guide contains instructions to diagnose frequently encountered issues while using the Azure Container Registry client library for JavaScript and TypeScript.
4
+
5
+
## General Troubleshooting
6
+
7
+
Container registry service methods throw [`RestError`] on failure.
8
+
9
+
### Enable client logging
10
+
11
+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
12
+
13
+
```javascript
14
+
const { setLogLevel } =require("@azure/logger");
15
+
16
+
setLogLevel("info");
17
+
```
18
+
19
+
See the [logger reference documentation][logging reference] for more information on how to configure logging.
20
+
21
+
## Troubleshooting authentication errors
22
+
23
+
### HTTP 401 Errors
24
+
25
+
HTTP 401 errors indicate problems authenticating. Check the exception message or logs for more information.
26
+
27
+
#### Anonymous access issues
28
+
29
+
You may see an error similar to the one below. It indicates an attempt to perform an operation that requires authentication without credentials.
30
+
31
+
```
32
+
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, visit https://aka.ms/acr/authorization for
33
+
more information."}]}
34
+
```
35
+
36
+
Unauthorized (anonymous) access can only be enabled for read (pull) operations such as listing repositories, getting properties or tags. Refer to [Anonymous pull access] to learn about the limitations of anonymous access.
37
+
38
+
### HTTP 403 Errors
39
+
40
+
HTTP 403 errors indicate that user is not authorized to perform a specific operation in Azure Container Registry.
41
+
42
+
#### Insufficient permissions
43
+
44
+
If you see an error similar to the one below, it means that the provided credentials do not have permission to access the registry.
1. Check that the application or user that is making the request has sufficient permissions. Check [Troubleshoot registry login] for possible solutions.
53
+
1. If the user or application is granted sufficient privileges to query the workspace, make sure you are authenticating as that user/application. If you are authenticating using [DefaultAzureCredential], check the logs to verify that the credential used is the one you expected. To enable logging, see the [Enable client logging] section above.
54
+
55
+
#### Network access issues
56
+
57
+
The below error indicates that public access to the Azure Container Registry is disabled or restricted. Refer to [Troubleshoot network issues with registry] for more information.
58
+
59
+
```
60
+
RestError: {"errors":[{"code":"DENIED","message":"client with IP '<your IP address>' is not allowed access. Refer https://aka.m
0 commit comments