这次的问题是用jgit实现代码git仓库操作时碰到的缺陷
其他Git仓库都没问题,就是在连接Azure Devops的Git仓库时,却报了这个错,
换jar什么都试了遍都不行,不过翻看了官方文档之后找到了思路
只要创建个人访问令牌,并在Git请求的时候带上这个令牌就可以了
用这个令牌甚至都不需要用户名密码
还有一个问题是怎么在Jgit的写法里面带上这个token
这里给个思路
HttoTransport.setConnectionFactory();
只要在这个里面set自己定义的http连接工厂类就行了,然后在里面的http请求里面加上之前创建的token即可
解决问题还是要看官方文档啊。