Tag Archives: connect

Git clone appears fatal: unable to access’ https://github.com/… The solution to the problem

As shown in the figure below, this error occurs when I try to clone someone else’s repo. When I clone from git: /, instead of HTTPS://, it works well.

This happens because the agent is configured in GIT. Since it’s an HTTPS proxy (not HTTP) git config http.proxy And git config — Global http.proxy It doesn’t help.

Solution 1

1. Look at your git configuration

git config –global -l

If you don’t have any content related to the HTTPS proxy, such as HTTPS_ Proxy =… That’s not the problem.

If you have any content related to the HTTPS proxy, please remove it from the ~ /. Gitconfig file and try again.

2. If it still doesn’t work, unset the environment variable

env|grep -i proxy  

You should have one or more lines_ proxy = …

Use the following to cancel settings one by one: cancel settings_ Proxy (or HTTPS)_ Proxy, depending on the name of the variable)

3. Check the environment variables again

env|grep -i proxy  

If it doesn’t show anything, you should be good.

Note: this solution can be applied to HTTP and HTTPS proxy problems. Only the variable name is changed from HTTPS to http.

Solution 2

On the premise of opening shadowlocks, manually configure git agent. Git client can input the following two commands.

git config –global http.proxy http://127.0.0.1 :1080

git config –global https.proxy http://127.0.0.1 :1080

Http:// can also be changed to sockets5://, but the difference is that Socks5 does not support password free login to GitHub through pubkey, and only user name and password can be entered for each code submission. HTTP can support password free login.

Cancel agent:

git config –global –unset http.proxy  

git config –global –unset https.proxy  

In fact, plan 1 and plan 2 are the same method, but plan 2 is more specific. Most problems can be solved by plan 2. When plan 2 is invalid, plan 1 should be considered.

 

reference: https://stackoverflow.com/questions/24543372/git-cannot-clone-or-push-failed-to-connect-connection-refused  

An error keyerror255 was reported when pymysql connect to MySQL

Contents of articles

Solutions for error reporting

abstract

Pymysql connect to MySQL reported an error of keyerror255. Recently, I was trapped for more than two months by a difficult problem. If you search this title, you can see that the search engine has provided n ^ 2 articles on solutions. Why do you still trap me for so long?Don’t I know Baidu?NO NO NO!! The biggest problem is that my executive computer and data storage computer are not the same computer!!

Error information

  File "D:\Programfiles\Anaconda3\lib\site-packages\pymysql\connections.py", line 1269, in _get_server_information
    self.server_charset = charset_by_id(lang).name
  File "D:\Programfiles\Anaconda3\lib\site-packages\pymysql\charset.py", line 38, in by_id
    return self._by_id[id]
KeyError: 255

The main reason is that MySQL 8.0 updates many character sets, but these character sets are longer than 255 , so the old version of pymysql does not support characters longer than 255

Online can find a lot of articles to solve this problem, consistent solution, update pymysql

pip install --upgrade pymysql

The following casually put a, interested can see, don't look also doesn't matter, full text summary on a sentence update pymysql, directly execute the above update code, if solve, OK! All is well, you can quit, but you can't solve it. The link article is not meaningful. Let's continue to read my text

Django appears after changing the default database SQLite3 to pymsql Keyerror:255 How to upgrade pymysql

Solution

As mentioned before, my executive computer and data storage computer are not the same computer!!
My own computer is mysql5.7, and the data storage computer version is 8.1
because at the beginning, the company's network security was upgraded to a secondary level, and then the company's intranet VPN was updated once (big exchange, the interface is different),
so at the beginning, I thought it was caused by the network security policy,
after all, all the online updates are pymysql, I'm already up-to-date and can't update any more

In fact, the solution is in a word, too lazy to beat around the bush so many words

uninstall and reload MySQL

yes! You're right! Is the MySQL database to unload, and then re install a version of 8.0 and above

So the main reason is that at the beginning MySQL 8.0 has updated many character sets, but the length of these character sets exceeds 255


Write in the last canvassing session
recently participated in the CSDN official organization of "geek +" original blogger competition
after many screening, finally on the top 50
original is not easy, help cast a free vote
support: Click to vote
thank you!!!