Merge conflict and API error on cargo deploy

I have configured Travis to deploy a Rust project. The build completes but 2 errors.
One is

error: api errors (status 403 Forbidden): must be logged in to perform that action

and the other is

error: Your local changes to the following files would be overwritten by merge: 
     version3/rust/Cargo.lock
Please commit your changes or stash them before you merge.

Error log

Preparing deploy
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment#Uploading-Files-and-skip_cleanup.
Saved working directory and index state WIP on (no branch): f7f9bad update travis config
dpl.3
Deploying application
    Updating crates.io index
   Packaging amcl v3.2.0 (/home/travis/build/lovesh/amcl-mirror/version3/rust)
   Verifying amcl v3.2.0 (/home/travis/build/lovesh/amcl-mirror/version3/rust)
   Compiling amcl v3.2.0 (/home/travis/build/lovesh/amcl-mirror/version3/rust/target/package/amcl-3.2.0)
warning: variant `NOT_SPECIAL` should have an upper camel case name
 --> src/types.rs:3:5
  |
3 |     NOT_SPECIAL,
  |     ^^^^^^^^^^^ help: convert the identifier to upper camel case: `NotSpecial`
  |
  = note: #[warn(non_camel_case_types)] on by default
warning: variant `PSEUDO_MERSENNE` should have an upper camel case name
 --> src/types.rs:4:5
  |
4 |     PSEUDO_MERSENNE,
  |     ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `PseudoMersenne`
warning: variant `MONTGOMERY_FRIENDLY` should have an upper camel case name
 --> src/types.rs:5:5
  |
5 |     MONTGOMERY_FRIENDLY,
  |     ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `MontgomeryFriendly`
warning: variant `GENERALISED_MERSENNE` should have an upper camel case name
 --> e[0msrc/types.rs:6:5
  |
6 |     GENERALISED_MERSENNE,
  |     ^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GeneralisedMersenne`
warning: variant `D_TYPE` should have an upper camel case name
  --> src/types.rs:26:5
   |
26 |     D_TYPE,
   |     ^^^^^^ help: convert the identifier to upper camel case: `DType`
warning: variant `M_TYPE` should have an upper camel case name
  --> src/types.rs:27:5
   |
27 |     M_TYPE,
   |     ^^^^^^ help: convert the identifier to upper camel case: `MType`
warning: constant item is never used: `GCM_ENCRYPTING`
  --> src/gcm.rs:25:1
   |
25 | const GCM_ENCRYPTING: usize = 0;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(dead_code)] on by default
warning: constant item is never used: `GCM_DECRYPTING`
  --> src/gcm.rs:26:1
   |
26 | const GCM_DECRYPTING: usize = 1;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Finished dev [unoptimized + debuginfo] target(s) in 23.87s
   Uploading amcl v3.2.0 (/home/travis/build/lovesh/amcl-mirror/version3/rust)
error: api errors (status 403 Forbidden): must be logged in to perform that action
error: Your local changes to the following files would be overwritten by merge:
	version3/rust/Cargo.lock
Please commit your changes or stash them before you merge.
Aborting
Publish failed
failed to deploy

This is the build job https://travis-ci.com/lovesh/amcl-mirror/jobs/208837267

  1. Your encryption is probably wrong. Your builds are running on .com, so you need to pass --pro if you are using the CLI.
    travis encrypt --pro …
  2. You probably need to keep your build artifacts and tell the deployment utility to not clean up. See https://docs.travis-ci.com/user/deployment/#uploading-files-and-skip_cleanup
Imprint