Error with dotfiles installation

Hi. When I try to run

~/.dotfiles/bin/install_dotfiles

in my terminal, after after i choose ‘y’ to continue, i get a message the Permission Denied.

how can i fix this?

below is the error message that i get:

Continue? (y/n)
y
/Users/danielnam/.dotfiles/bin/.install_dotfiles.rb:56:in write': Permission denied - /Users/danielnam/.bash_profile (Errno::EACCES) from /Users/danielnam/.dotfiles/bin/.install_dotfiles.rb:56:ininstall’
from /Users/danielnam/.dotfiles/bin/.install_dotfiles.rb:131:in each' from /Users/danielnam/.dotfiles/bin/.install_dotfiles.rb:131:ininstall_dotfiles’
from /Users/danielnam/.dotfiles/bin/.install_dotfiles.rb:124:in main' from /Users/danielnam/.dotfiles/bin/.install_dotfiles.rb:162:in'
daniels-macbook:~ danielnam$ ~/.dotfiles/bin/install_dotfiles