Skip to content

Commit

Permalink
remove username and password from repository URL
Browse files Browse the repository at this point in the history
  • Loading branch information
sbj42 authored and kzu committed Sep 21, 2020
1 parent 0bcd7c1 commit 30a6d14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/GitInfo/build/GitInfo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@
<Warning Condition="'$(MSBuildLastExitCode)' != '0'"
Text="Could not retrieve repository url for remote '$(GitRemote)'" />

<PropertyGroup>
<!-- Remove username and password from repository URL -->
<GitRepositoryUrl>$([System.Text.RegularExpressions.Regex]::Replace($(GitRepositoryUrl), "://[^/]*@", "://"))</GitRepositoryUrl>
</PropertyGroup>

<!--TODO: Sensible default for GitRepositoryUrl-->
</Target>

Expand Down

0 comments on commit 30a6d14

Please sign in to comment.