61

When trying to push an update to my cocoapod framework to the repo with pod trunk push as mentioned in the title, I get the following error:

[!] Authentication token is invalid or unverified. Either verify it with the email that was sent or register a new session.

I've updated the cocoapod before, how do I verify my email or session?

Edit: Sometimes I also get the error: [!] You need to register a session first.

Justin Vallely
  • 5,932
  • 3
  • 30
  • 44
  • 1
    Possible duplicate of [CocoaPods Trunk cannot push update: "You need to register a session first."](https://stackoverflow.com/questions/23900688/cocoapods-trunk-cannot-push-update-you-need-to-register-a-session-first) – pkamb Oct 09 '18 at 08:08

2 Answers2

123
  1. Run the following command in terminal:

    pod trunk register yourEmail@example.com 'Your Name'

  2. Click the link in the email that is sent to you.

  3. Run your pod trunk push command in terminal again

Justin Vallely
  • 5,932
  • 3
  • 30
  • 44
9

This failed me just now, looks like there is an additional requirement to perform the registration as outlined here.

  1. From terminal run: pod trunk register myemail@domain.com 'MyName'
  2. Click on the link for the email sent to your address
  3. Run pod trunk push again

To highlight, the difference from Justin's answer was to include the name value. It would not allow me to register without it.

CodeBender
  • 35,668
  • 12
  • 125
  • 132