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>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM