git命令中带有特殊符号如@

使用带用户密码clone的方式:
git clone https://username:password@remote

当username和password中含有特殊符号会导致出错,
因为为http的请求,所以需要将特殊符号encode成url格式的

java使用:

String c = java.net.URLEncoder.encode(".","utf-8");
System.out.println(c);

 

源文档 <http://blog.csdn.net/qq1142003960/article/details/48323495>

posted @ 2017-06-22 18:59  whendream  阅读(3444)  评论(0编辑  收藏  举报