func WriteCredentialsFile(credentials *cloud.CredentialCollection) error {
	data, err := yaml.Marshal(credentials)
	if err != nil {
		return errors.Annotate(err, "cannot marshal yaml credentials")
	}
	return utils.AtomicWriteFile(JujuCredentialsPath(), data, os.FileMode(0600))
}
// WriteCredentialsFile marshals to YAML details of the given credentials
// and writes it to the credentials file.
WriteCredentialsFile marshals to YAML details of the given credentials
and writes it to the credentials file.
// WriteCredentialsFile marshals to YAML details of the given credentials // and writes it to the credentials file .
func WriteCredentialsFile(credentials *cloud.CredentialCollection) error {
	data, err := yaml.Marshal(credentials)
	if err != nil {
		return errors.Annotate(err, "cannot marshal yaml credentials")
	}
	return utils.AtomicWriteFile(JujuCredentialsPath(), data, os.FileMode(0600))
}
func WriteCredentialsFile ( credentials * cloud . CredentialCollection ) error { data , err := yaml . Marshal ( credentials ) if err != nil { return errors . Annotate ( err , " " ) } return utils . AtomicWriteFile ( JujuCredentialsPath ( ) , data , os . FileMode ( 0600 ) ) }
WriteCredentialsFile marshals to YAML details of the given credentials
and writes it to the credentials file.
WriteCredentialsFile marshals to YAML details of the given credentials and writes it to the credentials file .