opened
rishabhtayal
username_0
I am getting code signing error. The certificate is valid and stored in local keychain. Not sure what's the issue.

`Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) were found.`
Code signing error even when certificate is in keychain
issue
created
KrauseFx
username_1
Please share information about your setup, in particular configuration files like your `Fastfile`, a screenshot of your Xcode project setting and if you use [match](https://github.com/fastlane/match)
comment
created
rishabhtayal
username_0
@username_1 Here is my Fastfile: https://gist.github.com/username_0/0a65a42dbf32fcfc701b. Also attached is the screenshot of Xcode project setting.
![screen shot 2016-01-07 at 9 43 09 am](https://cloud.githubusercontent.com/assets/2100166/12174607/32e27f6a-b523-11e5-8a17-01b18fbeeeb5.png)
comment
created
rishabhtayal
username_0
@username_1 Any updates?
comment
created
triage
username_2
this seems to have happened to us over the weekend, too.

here's our fastfile
```
before_all do |lane, options|
  import_certificate({
    certificate_path: "fastlane/signing/MyCompany-Enterprise.p12",
    certificate_password: "<not our password>",
    keychain_name: "login.keychain"
  })
  cocoapods
end

lane :build do |options|
  #custom action to download a specific provisioning profile
  profile = sigh_download_profile({
    password: options[:password],
    provisioning_name: "My Company Development - Distribution",
  })
  gym(
    scheme: "Development",
    provisioning_profile_path: profile,
    codesigning_identity: "iPhone Distribution: My Company Inc.",
    export_method: "enterprise",
    xcargs: "APP_VERSION=#{options[:version]} BUILD_VERSION=#{options[:build]}",
    output_name: "Development"
  )
  clean_build_artifacts
end
```
comment
created
KrauseFx
username_1
You both should start using [match](https://github.com/fastlane/match) with the [codesigning.guide](https://codesigning.guide) and also follow the [Xcode instructions](https://github.com/fastlane/match#setup-xcode-project) :+1:
comment
created
triage
username_2
@username_1 we'd love to use Match! ... but we have existing enterprise apps w/ associated certs/profiles, etc.
comment
created
triage
username_2
for anyone else that arrives here and by chance was building with CircleCI, `keychain_name: "login.keychain"` was working till this weekend for us. Changed to "circle.keychain"` and everything works fine again.
comment
created
rishabhtayal
username_0
I agree with @username_2. For my project its not possible for me to use matc
comment
created
rishabhtayal
username_0
@username_1 @username_2 I added `codesigning_identity: "iPhone Distribution: My Company Inc.",` to my `Fastfile` and it worked! It now detects the signing certificate from my keychain. May be this issue can be fixed in next fastlane version.
comment
created
rishabhtayal
username_0
Closing the issue now.
comment
closed
rishabhtayal
username_0
issue
created
flexaddicted
username_3
@username_5 can you share you Fastfile? In addition, where is your ent certificate located? Mine has been inserted into login.keychain. What I'm missing are the profile path and the export method. The first shoul be optional, as per doc. @username_1 any suggestion?
comment
created
flexaddicted
username_3
Typo: your Fastfile
comment
created
TKBurner
username_4
Hi @username_3! Can you let me know what command you are using and share the full output of your error message? I definitely want to take a look 👍
comment
created
RishabhTayal
username_5
@username_3 

``` gym({
      scheme: ENV['SCHEME'],
      export_method: 'enterprise',
      # codesigning_identity: 'iPhone Distribution: *****'
      })
```
comment
created
flexaddicted
username_3
- Used command (the **ENV** variables are contained into a *.env* file)

```
gym(
        scheme: ENV['XCODE_SCHEME'],
        project: ENV['PROJECT'],
        sdk: ENV['SDK'],
        codesigning_identity: ENV['CODE_SIGN'],
        use_legacy_build_api: true,
        output_directory: ENV['OUTPUT_DIRECTORY'],
        configuration: 'Release'
    )
```

- Xcode configuration

<img width="592" alt="xcode" src="https://cloud.githubusercontent.com/assets/1482350/14800962/8f4afc3a-0b3d-11e6-99cf-29095138ffa9.png">

**NOTE** If I move the enterprise certificate into the **System.keychain** it works correctly. But this is not  what I want. In addition to that, the configuration I set runs correctly into a CI environment.
comment
created
RishabhTayal
username_5
I believe I have set the code signing identity in Xcode configuration that’s why I did not need it. You may use it though.


>
comment