How to add a PostgreSQL 10 identity column to an existing table?
You need to declare the type of the column, too (INT or BIGINT or 
SMALLINT):

ALTER TABLE sourceTable 
    ADD COLUMN ogc_fid int                -- int or bigint or smallint
        GENERATED BY DEFAULT AS IDENTITY;


Also be sure to use the latest point release. As the IDENTITY has only been recently added, there were bugs affecting this particular command before Postgres 10.2. See: 
How to add a PostgreSQL 10 identity column to an existing table with rows?