具有静态 IP 的计算机上的 Git 存储库
我想要一个用于个人私人项目的 Git 存储库。
我可以在我的 Ubuntu 家用计算机上托管我的服务器,但它的 IP(在本地网络上)总是在变化,所以我无法随时从我的 Macbook 通过 SSH 访问它。更重要的是,我总是希望在我的 Ubuntu 上有一个可用的工作副本,以便我可以像在 Macbook 上一样使用它。
有办法做这两件事吗? (也就是说,让我的Ubuntu本地(192.168.1.*)ip始终相同,并让Mac直接推送到服务器更新工作目录?)
I want to have a Git repository for personal private projects.
I can host my server on my Ubuntu home computer but its IP (on the local network) is always changing so I can't reach it by SSH at any time from my Macbook. What's more, I always want to have a working copy available on my Ubuntu so that I can work on it just as on my Macbook.
Is there a way to do those two things ? (that's to say, making my Ubuntu's local (192.168.1.*) ip always the same and having the Mac directly push to the server updating the working directory ?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在两台计算机上安装 DropBox,然后推送到您的 Dropbox。更快、更轻松、在任何地方工作,并且仍然允许您备份到其他服务器上。
Install DropBox on both machines, and just push to your dropbox. Faster, easier, works anywhere, and still lets you back up onto your other server.
在这里将 Ubuntu 盒子的 IP 地址设置从 DHCP 更改为静态 IP 会很有帮助...网上已经有几个教程,从快速谷歌获取的 1 个是
http://www.ubuntugeek .com/change-ubuntu-system-from-dhcp-to-a-static-ip-address.html
进行此更改后,您的 Ubuntu 盒子将始终获得您在配置中提到的分配的 IP ,然后就可以访问它了通过 LAN 没有任何问题。
here changing your IP Address setting for Ubuntu box from DHCP to Static IP would be helpful... there are several tutorials already available for it online, 1 fetched from quick google is
http://www.ubuntugeek.com/change-ubuntu-system-from-dhcp-to-a-static-ip-address.html
after making this change, your Ubuntu box will always get the IP assigned as mentioned in the configuration made by you, and then you can access it over LAN without any problem.