# Disable artifacts default download location?

**URL:** <https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791>\
**Category:** General Usage\
**Created:** [October 5, 2020, 2:54pm UTC](https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791 "2020-10-05T14:54:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrChainsaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drchainsaw/32/8497_2.png) [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Post date:** [October 5, 2020, 2:54pm UTC](https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791/1 "2020-10-05T14:54:45Z")

</div>

Hi,

I have an Artifacts.toml with the following vanilla tarball artifact:

```julia
[artifactX]
git-tree-sha1 = <generated through create_artifact(d -> path_to_manually_downloaded_tarball, artifact_toml) >
lazy = true

    [[artifactX.download]]
    url = "https://somewhere/some.tar.gz "
    sha256 = <generated by just copy-pasting from the error message when trying to load the artifact when there is just gibberish here>

```

It seems to work as it should except that when downloading the artifact I always first get an error message which indicates that there was an attempt to download it from [pkg.julialang.org](http://pkg.julialang.org) before it attempts to download from the specified location:

```julia
julia> artifact"artifactX"
Downloading artifact: artifactX
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
At line:12 char:1
+ $webclient.DownloadFile("https://pkg.julialang.org/artifact/4b825dc64 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
Downloading artifact: artifactX

julia> # Second attempt is successful

```

Is there a way to disable this download location? I don’t think I’m allowed to publish the file externally.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 7, 2020, 8:23am UTC](https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791/2 "2020-10-07T08:23:44Z")

</div>

It should fail silently so not sure why that is not happening here. Perhaps open an issue at [Pkg.jl](https://github.com/JuliaLang/Pkg.jl/issues)?

---

<div class="post-metadata">

**Author:** ![DrChainsaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drchainsaw/32/8497_2.png) [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Post date:** [October 7, 2020, 8:24am UTC](https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791/3 "2020-10-07T08:24:38Z")

</div>

Thanks. Will do!

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 7, 2020, 8:28am UTC](https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791/4 "2020-10-07T08:28:26Z")

</div>

> [@DrChainsaw](#):
>
> I don’t think I’m allowed to publish the file externally.

FYI, if you publish the package and this URL is public the artifact will be cached by [pkg.julialang.org](http://pkg.julialang.org).

---

<div class="post-metadata">

**Author:** ![DrChainsaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drchainsaw/32/8497_2.png) [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Post date:** [October 7, 2020, 8:33am UTC](https://discourse.julialang.org/t/disable-artifacts-default-download-location/47791/5 "2020-10-07T08:33:07Z")

</div>

> [@fredrikekre](#):
>
> FYI, if you publish the package and this URL is public the artifact will be cached by [pkg.julialang.org](http://pkg.julialang.org).

Good to know. I will publish it in a local/internal registry and the URL is not public. Should not be any issues, right?
