I tried the following on the command prompt in bash:
sudo cat << EOF > /etc/yum.repos.d/some-name.repo #Content #.... #... EOF
It
Another option is tee.
cat << EOF | sudo tee -a /etc/yum.repos.d/some-name.repo ... EOF