正常使用git clone 的方式
git clone https://remote
使用帶用戶名密碼的方式(可以避免后續每次都要輸入用戶名密碼)
git clone https://[username]:[password]@/remote
但有時會出現用戶名或密碼中含有像@這樣的特殊符號,而不能被正常解析
我們需要通過下面方式進行重新編碼
String c = URLEncoder.encode("@","utf-8");
System.out.println(c);
console -> %40
所有這樣就可以知道@在url中需要寫成%40的形式