赞
踩
配置文件地址.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = "https://username:123@456@xxx.xxx.com/router/conf.git"
fetch = +refs/heads/*:refs/remotes/origin/*
如果这样的话,那么在请求url的时候会将第一个@后面的字符串当成git服务器的地址,所以这个时候就会报错
Couldn't resolve 'host456@xxx.xxx.com'
所以需要针对特殊字符进行修改,换成可识别的字符,@就是%40,改成下面的配置即可
url = "https://username:123%40456@xxx.xxx.com/router/conf.git"
其它url特殊字符参考下表
空格 - %20 " - %22 # - %23 % - %25 & - %26 ( - %28 ) - %29 + - %2B , - %2C / - %2F : - %3A ; - %3B < - %3C = - %3D > - %3E ? - %3F @ - %40 \ - %5C | - %7C
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。