Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

zac owens
zac owens
7,700 Points

using git remote push/pull with your URL domain

i am trying to use git on my computer/webserver and want to do the following at 3:20 on till about the end https://teamtreehouse.com/library/git-basics/working-with-remote-repositories/cloning

the command it says to add a remote is this"git remote add webSite1 pathToTheRepoButWithURL " I did this and it works

git remote add webSite1 'http://mySite.com/first/dev/'

but then I tried to push with this command

git push webSite1 master

and got the following error

"fatal: repository 'http://mySite.com/first/dev/' not found"

I have put the repository folder in my website file path where index.html landing page has a folder name "first "and then inside that folder "dev" repsitory is placed

I was able to push and pull with just the paths with out the url involved.

I know git hub has this capability but would like it on my site before I have thing go public.

thanks for any help

one other note i found somewhere ,that is permissions need to be set. so I went to the folder located on the webSite Server and it shows it with read permissions only. now I have tried to use the sudo command with the chmod command to change those since it did not work without sudo. the only problem there is sudo command is not found.

this is where I will leave you I am going to try to install this sudo command and then maybe from there I will be able to give permissions then use git to push with the URL.

if any body thanks I am on the right path or if they believe I should try something else I am all ears. but as of now I have not solved this yet.

1 Answer

zac owens
zac owens
7,700 Points

i had to do this to get it to work

"git clone -v mywebsite.com:/sub3/sub2/sub1/first/dev/.git"

I had to add three sub directory's for it to find the repo sub1, sub2, and sub3 directoy's

so keep adding parents folders till you are almost to the absolute path of where the git repo is
like this try sub1/ dev/ .git then this sub2/sub1/dev/.git sub3/sub2/sub1/dev/.git sub4/ sub3/sub2/sub1/dev/.git and so on