一般拉取线上代码的先
 1.git clone
 2.在输入用户名
 3.输入密码
 等三步操作,这样子太麻烦了
 直接一步操作
 git clone http://用户名:密码@地址
 1
 例子
 如果你用户叫123xxx 密码是mypassword 地址是git.xxx.com/www.git
git clone http://123xxx:mypassword@git.xxx.com/www.git
 注明:
 如果用户名是邮箱 会执行报错:
 fatal: unable to access 'http://abc@qq.com:abc123456@git.xxx.com/www.git/': Couldn't resolve host 'qq.com:abc123456@git.xxx.com'
 报错原因是因为用户名包含了@符号,所以需求要把@转码一下
<?php
$userame='abc@qq.com';
echo urlencode($userame);
?> 
abc%40qq.com
 @符号转码后变成了%40,所以只需在clone时将username变为abc%40qq.com即可,再次执行就ok了。