Bitbucket克隆:端口号以"T"结尾 [英] Bitbucket clone: Port number ended with 'T'

查看:357
本文介绍了Bitbucket克隆:端口号以"T"结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用jenkins execute shell(而不是git插件)为我的bitbucket存储库创建一个克隆(镜像).

I try to make a clone (mirror) of my bitbucket repo using jenkins execute shell (not the git plugin).

我的凭据:

username
passwd

保存在变量中:myuser 凭据是正确的.我们使用了此插件来保存凭据.我们对其他一些仓库(在我们本地的git上,而不是bitbucket上)执行的操作完全相同,并且效果很好.

are saved in a variable: myuser The credentials are right. We used this plugin to save the credentials. We're doing exactly the same for some other repo's (on our local git, not bitbucket) and it's working very good.

现在我尝试:

git clone --mirror https://${myuser}@bitbucket.org/team/repo.git

我面临的错误是:

fatal: unable to access 'https://****@bitbucket.org/team/repo.git/': Port number ended with 'T'

推荐答案

我们需要对URL进行编码,同时使用http或https协议在用户名或密码中传递特殊字符.例如,如果要在密码中使用 user#1 并在URL中使用它,则需要使用%23 #进行编码,然后密码变为 user%231 .

We need to encode the URL while passing special characters in the usernames or passwords with http or https protocol. For example if you want to use user#1 in password and want to use it in URL you need to encode the # using %23 and the password becomes user%231.

参考: https://github.com/curl/curl/issues /1909#issuecomment-331565533

这篇关于Bitbucket克隆:端口号以"T"结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆