dotnet nuget push command - .NET Core CLI(1)

dotnet nuget push

NAME

dotnet nuget push - Pushes a package to the server and publishes it.

SYNOPSIS

  .NET Core 2.1

    dotnet nuget push [<ROOT>] [-d|--disable-buffering] [--force-english-output] [-k|--api-key] [-n|--no-symbols]
        [--no-service-endpoint] [-s|--source] [-sk|--symbol-api-key] [-ss|--symbol-source] [-t|--timeout]
    dotnet nuget push [-h|--help]

  .NET Core 2.0

    dotnet nuget push [<ROOT>] [-d|--disable-buffering] [--force-english-output] [-k|--api-key] [-n|--no-symbols]
        [-s|--source] [-sk|--symbol-api-key] [-ss|--symbol-source] [-t|--timeout]
    dotnet nuget push [-h|--help]

  .NET Core 1.x

    dotnet nuget push [<ROOT>] [-d|--disable-buffering] [--force-english-output] [-k|--api-key] [-n|--no-symbols]
        [-s|--source] [-sk|--symbol-api-key] [-ss|--symbol-source] [-t|--timeout]
    dotnet nuget push [-h|--help]

   * * * * *

DESCRIPTION

The dotnet nuget push command pushes a package to the server and publishes it. The push command uses server and credential details found in the system's NuGet config file or chain of config files. For more information on config files, see Configuring NuGet Behavior. NuGet's default configuration is obtained by loading %AppData%.config (Windows) or $HOME/.local/share (Linux/macOS), then loading any nuget.config or .nuget.config starting from the root of drive and ending in the current directory.

  Arguments

ROOT

Specifies the file path to the package to be pushed.

OPTIONS

  .NET Core 2.1

-d|--disable-buffering

Disables buffering when pushing to an HTTP(S) server to reduce memory usage.

--force-english-output

Forces the application to run using an invariant, English-based culture.

-h|--help

Prints out a short help for the command.

-k|--api-key <API_KEY>

The API key for the server.

-n|--no-symbols

Doesn't push symbols (even if present).

--no-service-endpoint

Doesn't append “api/v2/packages” to the source URL.

-s|--source <SOURCE>

Specifies the server URL. This option is required unless DefaultPushSource config value is set in the NuGet config file.

-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 to 300 seconds (5 minutes). Specifying 0 (zero seconds) applies the default value.

  .NET Core 2.0

-d|--disable-buffering

Disables buffering when pushing to an HTTP(S) server to reduce memory usage.

--force-english-output

Forces the application to run using an invariant, English-based culture.

-h|--help

Prints out a short help for the command.

-k|--api-key <API_KEY>

The API key for the server.

-n|--no-symbols

Doesn't push symbols (even if present).

-s|--source <SOURCE>

Specifies the server URL. This option is required unless DefaultPushSource config value is set in the NuGet config file.

-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 to 300 seconds (5 minutes). Specifying 0 (zero seconds) applies the default value.

  .NET Core 1.x

-d|--disable-buffering

Disables buffering when pushing to an HTTP(S) server to reduce memory usage.

--force-english-output

Forces the application to run using an invariant, English-based culture.

-h|--help

Prints out a short help for the command.

-k|--api-key <API_KEY>

The API key for the server.

-n|--no-symbols

Doesn't push symbols (even if present).

-s|--source <SOURCE>

Specifies the server URL. This option is required unless DefaultPushSource config value is set in the NuGet config file.

-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 to 300 seconds (5 minutes). Specifying 0 (zero seconds) applies the default value.

   * * * * *

EXAMPLES

Pushes foo.nupkg to the default push source, specifying an API key:

dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a

Push foo.nupkg to the custom push source http://customsource, specifying an API key:

dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s http://customsource/

Pushes foo.nupkg to the default push source:

dotnet nuget push foo.nupkg

Pushes foo.symbols.nupkg to the default symbols source:

dotnet nuget push foo.symbols.nupkg

Pushes foo.nupkg to the default push source, specifying a 360-second timeout:

dotnet nuget push foo.nupkg --timeout 360

Pushes all .nupkg files in the current directory to the default push source:

dotnet nuget push *.nupkg

Pushes all .nupkg files in the current directory to the default push source, specifying a custom config file ./config/My.Config:

dotnet nuget push *.nupkg --config-file ./config/My.Config

AUTHORS
karann-msft.