dotnet-nuget-push(1)
π dotnet-nuget-push π
okay bestie, welcome to the dotnet-nuget-push(1) page from the .NET Documentation set β¨
This article applies to: βοΈ .NET 6 SDK and later versions β so if you're on something older, this is not your era, sorry babe π
NAME
dotnet-nuget-push β Pushes a package to the server and publishes it. fr fr that's the whole job. π¦β¨
SYNOPSIS
dotnet nuget push [<ROOT>] [--allow-insecure-connections] [-d|--disable-buffering] [--force-english-output]
[--interactive] [-k|--api-key <API_KEY>] [-n|--no-symbols]
[--no-service-endpoint] [-s|--source <SOURCE>] [--skip-duplicate]
[-sk|--symbol-api-key <API_KEY>] [-ss|--symbol-source <SOURCE>]
[-t|--timeout <TIMEOUT>]
[--configfile <FILE>]
dotnet nuget push -h|--help
DESCRIPTION
So the dotnet nuget push command pushes a package to the server and publishes it. That's it. That's the vibe. π
It grabs all the server + credential deets from the system's NuGet config file, or from a whole chain of config files. Wanna know more about config files? Go read Configuring NuGet Behavior π
NuGet's default configuration? It gets loaded like this, bestie:
- first it loads
%AppData%.configon Windows, or$HOME/.nuget/NuGet/NuGet.Configon Linux/macOS - then it loads any
nuget.configor.nuget.config, starting from the root of the drive and ending in the current directory π
β οΈ Important moment: this command pushes an existing package. It does not create a package. If you need to make one, that's dotnet pack's whole job, not this one's. π
Hierarchical folder structure
okay so this command can store packages in a hierarchical folder structure, and that's genuinely recommended because it optimizes performance β¨
Here's the tea: it stores packages in a hierarchical folder structure when you're publishing to a local folder (a feed), just like nuget add does β but only if there's already at least one package in the feed that's in a hierarchical folder structure. If the feed already has a hierarchical-folder-structured package in it, dotnet nuget push respects that structure. π«Ά
So, if you wanna publish to a local feed using the .NET CLI instead of the NuGet CLI:
- Before you publish the very first package, go to your global packages folder, at
*%userprofile%.nuget, and select the root folder of a package id. It can be any package that is not part of a framework, like .NET standard or ASP.NET. π - Copy the selected package folder into the root folder of the local feed. π
- Use
dotnet nuget pushto publish your package to the local feed. π - You can now delete the folder you previously copied in, and you can freely use
dotnet nuget pushto publish to your local feed. periodt π
Alternatively (no stress, there's another way), use the NuGet CLI for the first package, then you can use dotnet nuget push for the rest. For more information, see Local feeds. πΈ
ARGUMENTS
ROOTβ Specifies the file path to the package to be pushed. Like, where's the package at, bestie? Tell the command. π
OPTIONS
--allow-insecure-connectionsβ Allows pushing to HTTP sources (insecure). π¬ it's giving "risky behavior" but ok, you do you.-d,--disable-bufferingβ Disables buffering when pushing to an HTTP(S) server, which reduces memory usage. π§ β¨--force-english-outputβ Forces the application to run using an invariant, English-based culture. π¬π§-?,-h,--helpβ Prints out a description of how to use the command. classic. π--interactiveβ Allows the command to stop and wait for user input or action. For example, to complete authentication. Available since .NET Core 3.0 SDK. βΈοΈπ-k,--api-key <API_KEY>β The API key for the server. π-n,--no-symbolsβ Doesn't push symbols (even if present). nope, not today. π--no-service-endpointβ Doesn't append "api/v2/package" to the source URL. π-s,--source <SOURCE>β Specifies the server URL. NuGet identifies a UNC or local folder source and simply copies the file there instead of pushing it using HTTP. π¦
Starting with NuGet 3.4.2, this is a mandatory parameter unless the NuGet config file specifies a DefaultPushSource value. For more information, see Configuring NuGet behavior. β οΈ mandatory!! no cap.
--skip-duplicateβ When pushing multiple packages to an HTTP(S) server, treats any409 Conflictresponse as a warning so that other pushes can continue. π-sk,--symbol-api-key <API_KEY>β The API key for the symbol server. π-ss,--symbol-source <SOURCE>β Specifies the symbol server URL. π-t,--timeout <TIMEOUT>β Specifies the timeout for pushing to a server in seconds. Defaults to300seconds (5 minutes). Specifying0applies the default value. β°--configfileβ The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see Common NuGet Configurations. π
EXAMPLES
okay now the fun part, let's see it in action π¬
- Push
foo.nupkgto the default push source specified in the NuGet config file, using an API key:
dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a
- Push
foo.nupkgto the official NuGet server, specifying an API key:
dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s https://api.nuget.org/v3/index.json
- Push
foo.nupkgto the custom push sourcehttps://customsource, specifying an API key:
dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s https://customsource/
- Push
foo.nupkgto the default push source specified in the NuGet config file:
dotnet nuget push foo.nupkg
- Push
foo.symbols.nupkgto the default symbols source:
dotnet nuget push foo.symbols.nupkg
- Push
foo.nupkgto the default push source specified in the NuGet config file, with a 360-second timeout:
dotnet nuget push foo.nupkg --timeout 360
- Push all
.nupkgfiles in the current directory to the default push source specified in the NuGet config file:
dotnet nuget push "*.nupkg"
- Push all
.nupkgfiles to the default push source specified in the NuGet config file, even if a409 Conflictresponse is returned by an HTTP(S) server:
dotnet nuget push "*.nupkg" --skip-duplicate
- Push all
.nupkgfiles in the current directory to a local feed directory:
dotnet nuget push "*.nupkg" -s c:\mydir
- For pushing to Azure Artifacts, see Azure Artifacts' push documentation. βοΈβ¨
π and that's the whole page bestie, you ate that. go push some packages, you're the main character now π
with love, from the dotnet-nuget-push(1) girlies β dated 2025-10-30, and this page comes straight from the .NET Documentation set ππ
π¦ where this page comes from
- alpine 3.24: dotnet-doc 10.0.303-r2 Β· MIT
- centos-stream 10: dotnet-host 11.0.0~rc.2.26504.105-0.10.el10 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- centos-stream 9: dotnet-host 11.0.0~rc.2.26504.105-0.11.el9 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 43: dotnet-host 10.0.12-1.fc43
- fedora 43: dotnet-host 11.0.0~rc.1.26425.128-0.10.fc43 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 10.0.12-1.fc44
- fedora 44: dotnet-host 10.0.4-1.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 11.0.0~rc.1.26425.128-0.12.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- nixpkgs unstable: dotnet-vmr 11.0.0-rc.3
- ubuntu noble: dotnet-host-10.0 10.0.12-0ubuntu1~24.04.1
- ubuntu questing: dotnet-host-10.0 10.0.9-0ubuntu1~25.10.1
- ubuntu resolute: dotnet-host-10.0 10.0.12-0ubuntu1~26.04.1
- ubuntu resolute: dotnet-host-10.0 10.0.5-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-10.0 10.0.12-0ubuntu2 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc1-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc3-0ubuntu1~26.10.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms