How Do I Configure a Proxy?
Symptom
If any of the following scenarios occurs, no proxy is configured:
- Running a task returns the error "Access error. Please check the network or proxy."
- In TUI development mode, initial startup takes more than 10 seconds, and the model list cannot be loaded.
Cause Analysis
If you have completed authorization but are on an enterprise intranet, you need to configure a proxy.
Solution
Select a solution based on your operating system.
Windows
- Open the System Properties dialog box and click Environment Variables on the Advanced tab.
- Modify the user variables and create http_proxy and https_proxy.
The value of http_proxy is http://<proxy_user>:<proxy_password>@<proxy_host>:<proxy_port>, and the value of https_proxy is http://<proxy_user>:<proxy_password>@<proxy_host>:<proxy_port>. For details about how to set the parameters, see Table 1.
Table 1 Configuring a proxy Parameter
Description
<proxy_user>:<proxy_password>
Account and password for proxy login.
CAUTION:If your password contains special characters such as @ and %, escape them using URL encoding before entering the password. Otherwise, the proxy configuration will be invalid.
For example, if your password is Admin%@test, the password after URL encoding is Admin%25%40test. For details about URL encoding for common special characters, see Table 2 URL encoding for common characters.
If no username and password authentication is required, delete this parameter and the following @. The simplified format is http://<proxy_host>:<proxy_port>.
<proxy_host>
Proxy server domain name.
<proxy_port>
Proxy service listening port.
- Configure http_proxy and https_proxy.
- Click OK.
- After configuring the proxy, check whether the proxy configuration takes effect.
- Open the root directory of the target project.
- Right-click in the blank area and select Open Windows Terminal here.
- Enter /codearts in the terminal and press Enter to enter the TUI development environment. If models are displayed properly, the proxy configuration is successful. If models are still not displayed, you can submit a service ticket to get help from Huawei Cloud customer service.
If the issue persists, submit a service ticket to get help from Huawei Cloud customer service.
macOS/Linux
Perform the following steps to temporarily configure a proxy in the macOS terminal or Linux window:
- Run the following commands to configure a proxy for the current window:
export http_proxy="http://<proxy_user>:<proxy_password>@<proxy_host>:<proxy_port>" export https_proxy="http://<proxy_user>:<proxy_password>@<proxy_host>:<proxy_port>"
For details about how to set the parameters, see Table 1.
- Run codearts models to check whether the proxy configuration takes effect.
- If information similar to the following is displayed, the proxy is successfully configured.
model_id model_name ------------------------------------------------------------- huaweicloud-maas/deepseek-v3.2 DeepSeek-V3.2 huaweicloud-maas/GLM-4.7-SFT-Harmony GLM-4.7-ArkTS-SPARK huaweicloud-maas/Glm-5-internal GLM-5 huaweicloud-maas/GLM-5.1 GLM-5.1
- If an authentication failure or error message is displayed, run the following commands to check whether the proxy is correctly configured:
echo $http_proxy echo $https_proxy
If the issue persists, submit a service ticket to get help from Huawei Cloud customer service.
- If information similar to the following is displayed, the proxy is successfully configured.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot