Tag Archives: http

[Solved] HTTP receives the return value using tencoding Utf8 encoding error “no mapping for the Unicode…”

Today, I saw the error message sent by the boss of wumoonlight and the subsequent solutions in the group. I feel that I may encounter it in the future. Record it so that I can’t deal with it in the future. Thank you, boss Guang.

The problem is that some of the data in the return value is encoded in utf8 and some are not. Use tencoding When receiving the return value in utf8 format, an error “no mapping for the Unicode…”

The solution is: replace tencoding.com with tutf8encodeex format UTF8

Alamofire iOS Sent HTTP Request Error: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file.

Cause/solution: IOS network requests require high security. They are all in HTTPS format. If you do not want to use HTTP format, you must modify it in info.plist file to allow the use of HTTP format with low security, as shown in the figure below. Add app transport security settings in info.plist = = = = = = > Allow Arbitrary Loads

 

[Solved] Gitlab can clone via SSH, cannot clone via HTTP, and cannot pipeline. Prompt port 80: connection rejected

Problem record: vm-ubuntu 20.04 used NAT mode to connect at the beginning, and later changed to bridge mode. After the change, the gitlab service originally started with docker could not be cloned. It always prompted: fatal… There was no remote library. It was not solved. Later, the mapped directory, container and image were deleted and a new container was restarted, After configuration, SSH cloning can be performed, but HTTP cloning cannot be performed. When performing gitlab CI pipeline, you will be prompted with failed to connect to 192.168.xx.83 port 80: connection rejected

By trying the command: git clone http://192.168.1.83/liutaiqiang/test.git Unable to clone hint: failed to connect to 192.168.xx.83 port 80: connection rejected

By trying the command: git clone   http://192.168.1.83:9001/liutaiqiang/test.git You can clone. Modify gitlab.yml under/SRV/gitlab/data/gitlab rails/etc, change port 80 to 9001, and restart gitlab service, which will change back to port 80

The problem is solved by modifying in the following ways

Custom port used

View the ID of the container

wmg@debian:~$ sudo docker ps
CONTAINER ID        IMAGE                     COMMAND             CREATED             STATUS                   PORTS                                                            NAMES
1132de0d1960        gitlab/gitlab-ce:latest   "/assets/wrapper"   19 hours ago        Up 2 minutes (healthy)   80/tcp, 443/tcp, 0.0.0.0:8081->8081/tcp, 0.0.0.0:10022->22/tcp   gitlab

Remember the container ID

In order to prevent accidents, stop the container and docker before operation

docker stop gitlab         
systemctl stop docker

We need to change the HTTP port to access 9001, and the address at the time of cloning is correct. The SSH port of gitlab is changed to 8022 of the host.

Modify host /Config.v2.json and hostconfig.json files under VaR/lib/docker/containers/container ID/

root@debian:~# cd /var/lib/docker/containers/1132de0d1960e1049a3f1f014b2ba215442a6c7f23f4983b324e055306822c52/
root@debian:/var/lib/docker/containers/1132de0d1960e1049a3f1f014b2ba215442a6c7f23f4983b324e055306822c52# ls
1132de0d1960e1049a3f1f014b2ba215442a6c7f23f4983b324e055306822c52-json.log  checkpoints  config.v2.json  hostconfig.json  hostname  hosts  mounts  resolv.conf  resolv.conf.hash

config.v2.json

hostconfig.json

Tips: if VIM editing is not formatted, the readability will be very poor. I copied the file locally and changed it with Notepad + +

Modify the gitlab configuration file/etc/gitlab/gitlab.rb in the container

Because I mapped/etc/gitlab to/backup/gitlab/config, I went directly to this directory to modify the gitlab.rb file, with the following parameters

external 'http://192.168.88.213:8081'
nginx['listen_port'] = 8081
gitlab_rails['gitlab_shell_ssh_port'] = 10022

After the change, just start the docker and container

systemctl start docker

docker start gitlab

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.co

First, you need to find the. Condarc file
if you don’t know where it is, you can
Win + R
Enter% HomePath%

and then find

to replace the content with the following one

channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
show_channel_urls: true
ssl_verify: false