wouldd opened a new issue, #7419:
URL: https://github.com/apache/incubator-devlake/issues/7419

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   Soemwhere around the v1.0 release the underlying implementation for cloning 
git repos was changed, and since that point cloning azure deveops git 
repositories has not been working (on prem, though I would assume cloud is the 
same)
   The error reported is a 400 response.
   
   ### What do you expect to happen
   
   I expected git repos to continue to clone successfully, they were working 
fine before I updated the code base (to pick up an unrelated fix)
   
   ### How to reproduce
   
   Configure the azure devops connector, provide a valid PAT  and setup one or 
more repositories. run collect data. 
   I believe this would happen to azure cloud, if not then this could be 
specific to azure devops server which I know is technically unsupported. 
however this was working prior to picking up v1 changes and I can make it work 
with code changes now
   
   ### Anything else
   
   So from what I can tell the azure devops git server requires an 
AUTHORIZATION Basic header to be set with the base64 encoded version of an 
empty user and the pat token, eg-   :<token>  encoded as base64. It seems to 
need this in addition to the values being passed on the commandline in the url 
where we are setting https://git:<pat>@url
   In testing a fix locally I found that invoking the git cli directly as 
happens from this line: 
https://github.com/apache/incubator-devlake/blob/8a6bbe2b84d709e30d329cc7317ac85aa2398f10/backend/plugins/gitextractor/parser/clone_gitcli.go#L170C32-L171C2
   did not work, something about hte way go was passing the parameters to the 
command were corrupting the header. However if I isntead call bash and pass the 
git command as an argument then repository cloning works no problem
   
   Obviously my local fix is very specific to me, in taht I know I'm talking to 
azure devops so I can extract the PAT from the passed in url and encode it into 
a header etc. I'm not sure what hte general purpose fix for something like this 
would be.
   
   ### Version
   
   master
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to