Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

BadRequest when trying to push nuget package

$
0
0

I have .Net framework project and I'd like to publish it to private Nuget feed. Feed is working well as I have other projects published there and there was no problem with pushig until this project.

For publishing I'm using Github Actions and here it is:

name: My nuget publisheron:  push:    branches: [ master ]jobs:  build:    runs-on: windows-latest    name: Push to Feed    steps:      - name: Checkout        uses: actions/checkout@v2      - name: Setup build        uses: microsoft/setup-msbuild@v1.1        env:          NUGET_AUTH_TOKEN: ${{secrets.MY_SECRET}}              - name: Pack        run: nuget pack -build -Properties Configuration=Release      - name: Add source        run: nuget sources add -name "mysource" -Source https://nuget.pkg.github.com/MY_ORGANIZATION/index.json -Username MY_ORGANIZATION -Password ${{ secrets.MY_SECRET }}      - name: setapikey        run: nuget setapikey ${{ secrets.MY_SECRET }} -Source "mysource"      - name: Push        run: nuget push D:\a\MY_APP\MY_APP\*.nupkg -Source "mysource" -SkipDuplicate

Also in my .csproj file I have RepositoryUrl defined:

<PropertyGroup><RepositoryUrl>https://github.com/MY_ORGANIZATION/MY_APP</RepositoryUrl><RepositoryType>git</RepositoryType></PropertyGroup>

Package is created without an issue but when it tries to push it there's always an error:

Pushing MY_APP.1.0.0.nupkg to 'https://nuget.pkg.github.com/MY_ORGANIZATION'...  PUT https://nuget.pkg.github.com/MY_ORGANIZATION/WARNING: No destination repository detected. Ensure the source project has a 'RepositoryUrl' property defined. If you're using a nuspec file, ensure that it has a repository element with the required 'type' and 'url' attributes.  BadRequest https://nuget.pkg.github.com/MY_ORGANIZATION/ 27msResponse status code does not indicate success: 400 (Bad Request).

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>