"Invalid or non-existent authentication information" on PyPI upload

I’m trying to set up deployment with two targets: github releases and pypi.
I logged in travis with CLI:

travis login --com

For github releases I tried:

$ travis setup releases (called from repo dir)

It created

deploy: 
  provider: releases
  api_key:
    secure: wi...N45Jk=
  file:
    - dist/*.whl
    - dist/*.tar.gz
  on:
    repo: ilyachch/md_docs-trans-app

After manual triggered build on master i’ve got error:

/home/travis/.rvm/gems/ruby-2.4.5/gems/octokit-4.6.2/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/user: 401 - Bad credentials // See: https://developer.github.com/v3 (Octokit::Unauthorized)
failed to deploy

I tried to put secure key into quotes - same result.

Also I tried to set up a pypi deploy:

provider: pypi
user: ilyachch
password:
  secure: Kn...Nks0Q=
distributions: sdist bdist_wheel
skip_cleanup: true
skip_existing: true
on:
  repo: ilyachch/md_docs-trans-app
  branch: master
  python: '3.6'

several times tried to regenerate encrypted secure key in different ways:

echo -n "<password>" | travis encrypt --add deploy.password -r ilyachch/md_docs-trans-app
travis encrypt <password> -r ilyachch/md_docs-trans-app

tryed to put it into quotes as travis CLI outputed for last command

in all options there were:

HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/
PyPI upload failed.

Try adding --pro to travis encrypt, if you are trying to build on https://travis-ci.com.

The encryption is working on .org; e.g., https://travis-ci.org/ilyachch/md_docs-trans-app/jobs/531698319