The question is very confusing. You say you have 8 codewords. Then you say you want to find a linear code. What, if any, is the connection between the 8 codewords you have and the linear code you want to find?
Then you say you want to use a $(7,4)$ Hamming code. But a $(7,4)$ Hamming code has 16 codewords, so how does this relate to the 8 codewords you say you have?
Then you say you need to find a generator matrix and a parity check matrix. Do you need these for the $(7,4)$ Hamming code? or is this for the 8 codewords you have?
The only part of the question I feel comfortable answering is, yes, you can find a generator matrix from a parity check matrix. Any good text or notes on coding theory should show you how to do that.
Then in the comments you ask whether there is an easier way than just using $(111000000)$, $(000111000)$, and $(000000111)$. I don't know if there is an easier way, since I can't figure out what you are trying to accomplish (see my first three paragraphs). But you can certainly use those vectors to form the generator matrix for an 8-word, 1-error-correcting linear code and, while there may be better ways, I can't imagine a simpler one.
It seems to me that questions about forming generator matrices and turning parity check matrices into generator matrices were answered in your earlier question, Coding Theory and Generating a matrix.
Normally, you want to work with codes in standard form - that is, you want to write the generator matrix in the form $[I | P]$. Then, a parity check matrix corresponding to this code is $[-P^T | I]$ (i.e. it is a generator of the dual code - the code consisting of all vectors orthogonal to the original code).
Best Answer
If a $[n,k]$ linear binary code has $8$ codewords, you are being told that $k = \log_2 8 = 3$; an $[n,k]$ binary code has $2^k$ codewords. As discussed in Jyrki Lahtonen's answer to another question that you asked today, the Hamming spheres of radius $1$ centered at the $8$ codewords must not have any vectors in common. Since there are $1 + \binom{n}{1} = 1+n$ vectors in each such sphere, and $2^n$ vectors total, $n$ must be large enough so that $$2^n \geq 8(n+1) \Rightarrow n \geq 6.$$ Note also that you are asked for the generator matrix of the code which is a $k\times n$ matrix whose row-space (set of all $2^k$ linear combinations of the rows) is the set of codewords. So you could take the vectors suggested to you by Gerry Myerson as the rows of the generator matrix.
Be aware that shorter codes ($n$ smaller that $9$) can also be found. If you know about single-error-correcting Hamming codes, you can write down a $[7,4]$ code or a $[7,3]$ consisting of all the even weight codewords of the former, that can correct single errors.