133
edits
No edit summary |
|||
Line 2: | Line 2: | ||
At some stage, someone might put up a full tutorial showing how to use git, but for now, here's a badly written and terribly phrased guide on how to get and use a repository on redbrick's git hosting area. | At some stage, someone might put up a full tutorial showing how to use git, but for now, here's a badly written and terribly phrased guide on how to get and use a repository on redbrick's git hosting area. | ||
[[https://git.redbrick.dcu.ie]] is alive again. | |||
== Getting a git repository on Redbrick == | == Getting a git repository on Redbrick == | ||
`Redbrick hosts git repositories for users. You (and any other users you want) can have write access to the repositories. The world has read-only access via the web interface at [[http://git.redbrick.dcu.ie]]. It's perfect for any small open source projects you feel like starting, or if you want to branch/fork an existing open source project that's hosted on git. | |||
=== Can I have a private repository that the world can't see? === | === Can I have a private repository that the world can't see? === | ||
Yes any repository can be public or private. | |||
=== Can I use this to host my third year/fourth year/other important college project? === | === Can I use this to host my third year/fourth year/other important college project? === | ||
Line 55: | Line 54: | ||
This has created two files on your computer - id_rsa and id_rsa.pub. id_rsa is your '''private''' SSH key, and id_rsa.pub is the corresponding public key. You keep id_rsa to yourself, and you can give id_rsa.pub to admins to allow you to access a repository. You can also upload it to a remote server (like redbrick) and put it in a specific location to allow you passwordless logins, but you can google for how to do that. | This has created two files on your computer - id_rsa and id_rsa.pub. id_rsa is your '''private''' SSH key, and id_rsa.pub is the corresponding public key. You keep id_rsa to yourself, and you can give id_rsa.pub to admins to allow you to access a repository. You can also upload it to a remote server (like redbrick) and put it in a specific location to allow you passwordless logins, but you can google for how to do that. | ||
=== Create the repository === | === Create the repository === | ||
Line 73: | Line 68: | ||
git push origin master:refs/heads/master | git push origin master:refs/heads/master | ||
''Things to look out for:'' When you're doing the "git remote add origin" command, make sure you add ".git" to the end of the repository name. The system that redbrick uses (called | ''Things to look out for:'' When you're doing the "git remote add origin" command, make sure you add ".git" to the end of the repository name. The system that redbrick uses (called Gitea, if anybody cares) to manage repositories needs that there. Also, in "git@git.redbrick.dcu.ie", the "git" user isn't a placeholder. You need use that user, not your own redbrick username. |