Question: I'm getting this error with code signing with Xcode 8:

> 
> Your account does not have sufficient permissions to modify containers
> 
> 
> 

[![enter image description here](https://i.stack.imgur.com/9nx1E.png)](https://i.stack.imgur.com/9nx1E.png)

What does it want from me?

Answer: 
This seems like it may be a bug with XCode 8.
To resolve this, I unchecked the "automatically manage signing" checkbox in the of my target's General settings. I then archived my project by manually setting the provisioning profiles. After that succeeded, I went back and again checked the "automatically manage signing" checkbox and it stopped complaining with errors that made no sense.
I had the same issue with Xcode 9.2. But in my case, the problem was in **Keychain**: my dev certificate was saved into *login* keychain by default. I was able to build an app on a device only when I moved it to *System* keychain.

So the steps are next:

1. Open *Keychain Access*
2. Open *login* keychain (you can see the list of all keychains on the left top corner of the window)
3. Drag and drop your dev/distribution certificate into *System* keychain
4. You may need to input password.

PS: while doing this steps you also may need to unlock locks on the keychains.