fastlane-old / match

Easily sync your certificates and profiles across your team using git
https://codesigning.guide
339 stars 26 forks source link

No password supplied #42

Closed Charlisim closed 8 years ago

Charlisim commented 8 years ago

Running this command 'match development' with match 0.2.1 I get this error "[!] No password supplied" with 0.1.2 works fine.

| Summary for match 0.2.1 | +----------------+--------------------------------------------------------------+ | git_url | ssh://git@bitbucket.org/myrepo/myrepo.git | | type | appstore | | app_identifier | | | username | | | keychain_name | login.keychain | | readonly | false | | verbose | false | | force | false | | shallow_clone | true | +----------------+--------------------------------------------------------------+

[09:54:25]: Cloning remote git repo... [09:54:27]: Migrating to new match... [09:54:27]: 🔒 Successfully encrypted certificates repo [09:54:27]: Cloning remote git repo...

[!] No password supplied [09:54:29]: 🔒 Successfully encrypted certificates repo

KrauseFx commented 8 years ago

@Charlisim Could you search for match in your Keychain and see what password was saved? I assume for some reason it's "" (empty string), which is not allowed in the latest version any more.

If it's empty, you can easily re-encrypt all your files using

match change_password

From https://github.com/fastlane/match#change-password

Let me know if that works for you :+1:

Charlisim commented 8 years ago

In keychain the password is not empty, is the actual password. I tried with match change_password and same error

$ match change_password New password: **** [11:16:38]: Cloning remote git repo... [11:16:40]: Migrating to new match... [11:16:40]: 🔒 Successfully encrypted certificates repo [11:16:40]: Cloning remote git repo...

[!] No password supplied

skywinder commented 8 years ago

Same issue!

skywinder commented 8 years ago

match change_password --verbose

get this:

Passphrase for Git Repo: **********
bad decrypt
43093:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:/SourceCache/OpenSSL098/OpenSSL098-52.40.1/src/crypto/evp/evp_enc.c:330:
ERROR [2015-12-21 14:25:56.29]: Couldn't decrypt the repo, please make sure you enter the right password!
keychain: "/Users/**/Library/Keychains/login.keychain"
class: "inet"
attributes:
    0x00000007 <blob>="match_https://*****.git"
    0x00000008 <blob>=<NULL>
    "acct"<blob>=<NULL>
    "atyp"<blob>="dflt"
    "cdat"<timedate>=0x32303135313232313132323535365A00  "20151221122556Z\000"
    "crtr"<uint32>=<NULL>
    "cusi"<sint32>=<NULL>
    "desc"<blob>=<NULL>
    "icmt"<blob>=<NULL>
    "invi"<sint32>=<NULL>
    "mdat"<timedate>=0x32303135313232313132323535365A00  "20151221122556Z\000"
    "nega"<sint32>=<NULL>
    "path"<blob>=<NULL>
    "port"<uint32>=0x00000000
    "prot"<blob>=<NULL>
    "ptcl"<uint32>=0x00000000
    "scrp"<sint32>=<NULL>
    "sdmn"<blob>=<NULL>
    "srvr"<blob>="match_https://*****.git"
    "type"<uint32>=<NULL>
password has been deleted.
WARN [2015-12-21 14:25:56.35]: Enter the passphrase that should be used to encrypt/decrypt your certificates
WARN [2015-12-21 14:25:56.35]: This passphrase is specific per repository and will be stored in your local keychain
WARN [2015-12-21 14:25:56.35]: Make sure to remember the password, as you'll need it when you run match on a different machine
Passphrase for Git Repo:

But passphrase from keychain doesn't work..

skywinder commented 8 years ago

match 0.2.1

jdmoreira commented 8 years ago

Same issue. Rolled back to 0.1.2 and worked!

edit: It seems like it fails on the condition at lib/match/encrypt.rb line 75 to 78.

My MATCH_PASSWORD is set and echoing it works on bash. Maybe it's a problem with environment variables... Not sure

hjanuschka commented 8 years ago

same here on CI we set MATCH_PASSWORD as env. wich looks like is being ignored

AndreyNikiforov commented 8 years ago

Same issue.

I am installing fastlane as part of circleci build with command:

sudo gem install fastlane --version "=1.48.0", but somehow match got upgraded to 0.2.1.

tried: sudo gem install match --version "=0.1.2" and it reported as upgraded:

Fetching: match-0.1.2.gem (100%) Successfully installed match-0.1.2 1 gem installed

But when match is called it still reports as 0.2.1:

Summary for match 0.2.1

gpbl commented 8 years ago

@AndreyNikiforov I downgraded to 0.1.2 and uninstalled 0.2.1 with gem uninstall match to get the old version working.

AndreyNikiforov commented 8 years ago

Had to use the following in circle.yml to downgrade match:

dependencies:
  pre:
    - sudo gem install fastlane --version "=1.48.0"
    - sudo gem uninstall match --force --executables
    - sudo gem install match --version "=0.1.2"
toddhopkinson commented 8 years ago

I'm getting the same issue -- no password supplied, and the item doesn't get added to my keychain like it did at home this morning :(

[09:54:27]: 🔒 Successfully encrypted certificates repo [09:54:27]: Cloning remote git repo...

[!] No password supplied

yuriferretti commented 8 years ago

I don't know if this issue is related but when I'm trying to run match on Travis-CI I get the Invalid username or password. error despite the fact they're correct. In my local machine everything works like a charm!

AndreyNikiforov commented 8 years ago

@yuriferretti for CI server you may need to use git url as "git+ssh://git@github.com/myrepopath.git" and instruct CI server use "user key" instead of "deploy key" from github. See https://circleci.com/docs/git-npm-install

kdawgwilk commented 8 years ago

Also getting this this error and had to downgrade

MartinRogalla commented 8 years ago

Also had to downgrade because of this.

mladjan commented 8 years ago

I have the same problem in 1.2.2 I'm not using password for this repo, I'm using public key

ast3150 commented 8 years ago

Same issue, downgrading helped:

sudo gem install match --version "=0.1.2"
gem uninstall match
KrauseFx commented 8 years ago

Sorry everyone for the troubles with the latest release.

Please don't use the old release, as it had troubles with encrypting files. Instead please upgrade to the latest release using sudo gem update match and do the following:

match change_password

You should be asked for a new password. Feel free to re-enter the same one you already used. After that, match should have re-encrypted the files. Please make sure to update match to the latest version on all your machines.

Again, I'm really sorry about this issue - this should never happen again. Let me know if that works for you or if you run into any other issues :+1:

kdawgwilk commented 8 years ago

@KrauseFx Tried it again and got the same results :( screen shot 2015-12-29 at 1 46 17 pm

hjanuschka commented 8 years ago

same problem here - even after change_password - exact same as @kdawgwilk's screenshot

skywinder commented 8 years ago

@KrauseFx change_password doesn't work :cry: I solve the problem, creating new repo from the scratch with new version.

hjanuschka commented 8 years ago

@KrauseFx any chances we can get workaround, like decrypting the repo using old-match, storing it to /tmp/export and later on import from folder using new-match?

i basically want to avoid to nuke my account or renew all certs i am managing already with match!!

KrauseFx commented 8 years ago

I just pushed https://github.com/fastlane/match/releases/tag/0.2.3, could you please update and let me know if that fixes the problem?

match change_password

You should be asked for a new password. Feel free to re-enter the same one you already used. After that, match should have re-encrypted the files. Please make sure to update match to the latest version on all your machines.

hjanuschka commented 8 years ago

ok works! - i only had to run match with the old version once - so that i get a login.keychain entry, without the keychain entry (only env was set) - the re-crypt didn't work.

anyway i can confirm it works :rocket:

kyleturner commented 8 years ago

Still having problems even after trying to downgrade fastlane and match... going to try the tagged release 0.2.3 for match with the latest fastlane and see if that fixes things.

@KrauseFx Could you confirm which version of fastlane I should be using with 0.2.3 release of match?

kyleturner commented 8 years ago

I've tried upgrading to latest Fastlane (1.49.0) and Match (0.2.4) with the same behavior..

The two things that changed with my workflow when this started occurring:

  1. Adding unencrypted certificate/profile pair to private "Certificates" repo for Enterprise.
  2. Updating Fastlane and Match via usual means: sudo gem install fastlane and sudo gem install match.

Could anyone please provide their solution to this problem?

gpbl commented 8 years ago

@kyleturner in my experience if you install fastlane with sudo but you run it as normal user, things may not work as expected. Try to install without sudo. gem uninstall match and gem clean may also help!

kdawgwilk commented 8 years ago

I finally got things running smoothly by installing the latest version of fastlane (1.49.0) and match (0.2.4) and running 'match change_password' and using an empty string for the old password

KrauseFx commented 8 years ago

Thanks everyone for helping us resolve this issue :+1:

kyleturner commented 8 years ago

I figured out my issue... smack forehead.

I had manually added Certificates/Provisioning to my Certificates repo that were not being managed by Fastlane. This seems to cause problems NOT with the password but with the decryption. The console output is just misleading to think one has an issue with authentication, when really authentication is working great but it's just the decryption that's failing (from what I can tell).

I'd contribute a more thorough PR for error handling if I was proficient in Ruby, but I'd imagine @KrauseFx would rather have me out of there, for now. :)

Thanks for all the troubleshooting, everyone!

KrauseFx commented 8 years ago

@kyleturner you can try, Ruby is really easy. Also, check out countdown to instantly set up fastlane so you can contribute :+1:

fastlanebot commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/3452. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket: