I am trying to git clone a private repository from GitHub on EC2 instance at launch.
What I have in my script(user data) is the following.
git clone -b branchname https://github.com/orgname/reponame.git /var/tmp/reponame
For some reason, this ends up
Cloning into '/var/tmp/reponame'...
fatal: could not read Username for 'https://github.com': No such device or address
but works fine when executed after launching the instance. (I have tested it right after the instance launch)
What would be the cause of this error?