question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Building with SourceLink fails when there is no Git remote named "origin"

See original GitHub issue

Noticed in https://github.com/dotnet/iot/issues/553.

I also encountered this while porting Core-Setup to Arcade, but didn’t look into it yet to find this cause. (I disabled SourceLink for now in that effort.)

Repro:

git clone https://github.com/dotnet/arcade
cd arcade
git remote rename origin dotnet
.\Build.cmd
C:\Users\dagood\.nuget\packages\microsoft.sourcelink.common\1.0.0-beta2-19351-01\build\Microsoft.SourceLink.Common.targets(50,5): error : Source control information is not available - the generated source link is empty. [D:\temp\remote\arcade\src\Microsoft.DotNet.SignTool\Microsoft.DotNet.SignTool.csproj]
...

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
tmatcommented, Jul 7, 2019

Odd, that should work. Will take a look.

1reaction
tmatcommented, Jul 7, 2019

Definitely agree that the error message could be better. https://github.com/dotnet/sourcelink/issues/324 BTW, currently we first check for origin then for any other remote (the first one). dotnet/sourcelink#306 suggests to check the remote tracking branch before falling back to origin or other remote.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Git tell me "No such remote 'origin'" when I try to ...
The error message you're encountering indicates that there is no remote named 'origin' in your Git repository. This suggests that the ...
Read more >
How to fix fatal: origin does not appear to be a git repository
The fatal: 'origin' does not appear to be a git repository error occurs because git init does not link a local repository to...
Read more >
Remote Origin Already Exists Error: How To Fix It
1. Remove the Existing Remote · Create a new repository online using GitHub or GitLab. · Go to your local repository and remove...
Read more >
Producing Packages with Source Link - .NET Blog
Learn how to add Source Link to your packages, to make your users more productive while debugging.
Read more >
How to fix 'fatal: remote origin already exists' Git error
The most important thing to note here is that origin is only a handler's short name.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found