Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private Repositories and Public Mirrors URL link #1047

Open
jcurl opened this issue Jun 10, 2023 · 0 comments
Open

Private Repositories and Public Mirrors URL link #1047

jcurl opened this issue Jun 10, 2023 · 0 comments

Comments

@jcurl
Copy link

jcurl commented Jun 10, 2023

I have repositories locally on my BitBucket Server and mirrored on GitHub. I have the following refs:

  • origin so that the command git config --get remote.origin.url returns ssh://bitbucket/netfw/RJCP.DLL.SerialPortStream.git. Note, that the SSH configuration (.ssh/config) I use maps the keyword bitbucket to the correct host name.
  • github points to [email protected]:jcurl/SerialPortStream.git

I am trying to create using SourceLink a PDB that maps to github, not to my local (private) repository. On releases of my OSS packages I push to GitHub. I can't seem to get it to work, read various docs in the repository, tried to understand the implementation targets.

With:

<PropertyGroup>
  <RepositoryUrl>https://github.com/jcurl/RJCP.DLL.SerialPortStream</RepositoryUrl>
  <PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
  <PublishRepositoryUrl>true</PublishRepositoryUrl>
  <EmbedUntrackedSources>true</EmbedUntrackedSources>
  <IncludeSymbols>true</IncludeSymbols>
  <SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
  <DebugType>embedded</DebugType>
  <Optimize>true</Optimize>
  <Deterministic>true</Deterministic>
  <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
  <PackageReference Include="RJCP.MSBuildTasks" Version="0.2.3" PrivateAssets="all"/>
  <PackageReference Include="Microsoft.SourceLink.BitBucket.Git" Version="1.1.1" PrivateAssets="all"/>
  <SourceLinkBitBucketGitHost Include="bitbucket" ContentUrl="https://devfxio.net/bitbucket"/>
</ItemGroup>

I confirm that the NuPacket repository URL is https://github.com, and the PDBs point correctly to my own internal webserver hosting my code.

If I use instead Microsoft.SourceLink.GitHub, how do I get the source links to point to the URLs https://raw.githubusercontent.com/jcurl/SerialPortStream, instead of https://raw.githubusercontent.com/netfw/RJCP.DLL.SerialPortStream? I couldn't figure out either how to use the advanced options of <SourceRoot>, or in which Target to define that in, if that is even the correct place?

@jcurl jcurl changed the title Private Repositories and Mirrors URL link Private Repositories and Public Mirrors URL link Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant