# How to prevent an accidental upload in fpm?

**URL:** <https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470>\
**Category:** fpm\
**Created:** [September 5, 2023, 4:34pm UTC](https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470 "2023-09-05T16:34:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotr](https://avatars.discourse-cdn.com/v4/letter/p/839c29/32.png) [@piotr](https://fortran-lang.discourse.group/u/piotr)\
**Post date:** [September 5, 2023, 4:34pm UTC](https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470/1 "2023-09-05T16:34:56Z")

</div>

I want to change the build system of my Fortran project to fpm but my main concern is about the possibility of an accidental upload to the registry. Programming in Rust, I simply add `publish = false` to Cargo.toml but I couldn’t find a comparable solution in the documentation of fpm and fpm.toml.

I’m likely to share certain codes publicly in future but some may be unfinished or else intended to be kept private. All this will be developed on the same machine while I often navigate past commands in the terminal and occasionally click too fast a wrong command.

---

<div class="post-metadata">

**Author:** ![henilp105](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@henilp105](https://fortran-lang.discourse.group/u/henilp105)\
**Post date:** [September 5, 2023, 5:39pm UTC](https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470/2 "2023-09-05T17:39:35Z")

</div>

Hi @piotr , currently we don’t support automatic upload to the fpm registry it can only be done by running the `fpm publish` command with the `upload token` from the registry and as currently the fpm registry is in testing phase , all the packages uploaded in this phase will be deleted after we move from testing phase.

---

<div class="post-metadata">

**Author:** ![piotr](https://avatars.discourse-cdn.com/v4/letter/p/839c29/32.png) [@piotr](https://fortran-lang.discourse.group/u/piotr)\
**Post date:** [September 5, 2023, 5:53pm UTC](https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470/3 "2023-09-05T17:53:12Z")

</div>

Thanks, @henilp105 . I thought that the testing phase finished in June but it turns out that I should visit the Forum much more regularly. 😂

Once the testing phase is over… What if I type `fpm publish --token TOKEN` accidentally e.g. viewing past commands in the terminal? Think of an elegant way preventing fpm from an accidental upload.

---

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [September 5, 2023, 6:05pm UTC](https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470/4 "2023-09-05T18:05:35Z")

</div>

We need more Rust users! Thanks @piotr for posting.

@henilp105 Is there a new schedule for the test phase? I believe the new STF grant started in September, right?  
The last news were in May/June 2023:

> [@Fpm version 0.8.2 released: centralized registry playground](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792):
>
> Dear fortran-lang community, We are excited to release a new version of fpm: [v0.8.2](https://fpm.fortran-lang.org/en/news/2023/05-11-fpm-version-0.8.2.html). This release introduces fpm support for uploading packages to the fpm-registry server directly from the command-line interface, via fpm publish --token \<token-here\> fpm will now interact with a web interface that will help to manage the namespaces & packages. We have made an experimental registry available online at [https://registry-frontend.vercel.app/](https://registry-frontend.vercel.app/). We welcome testing from the fortran-lang community: …

---

<div class="post-metadata">

**Author:** ![henilp105](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@henilp105](https://fortran-lang.discourse.group/u/henilp105)\
**Post date:** [September 5, 2023, 6:15pm UTC](https://fortran-lang.discourse.group/t/how-to-prevent-an-accidental-upload-in-fpm/6470/5 "2023-09-05T18:15:17Z")

</div>

Thanks @piotr , we have implemented a time lock for the token , token is invalidated after a week (and has to renewed from the registry) , in the last STF term we had a conversation regarding implementation of the equivalent functionality to restrict upload like rust has for cargo , but it has not been implemented yet.

@ivanpribec yes , the new term has been approved, but not started due to some paper work.

We intend to shift the registry to the official subdomain of fortran-lang soon. We will be announcing a new round of testing in this term as we have some major changes in fpm to support the registry.
